Customization Options Expand for AutoCAD WS1 Nov, 2012 By: Andrew G. Roe
Autodesk releases new API that enables users to open the CAD drawing editor from a mobile application.
Users of AutoCAD WS should be happy to know that customization options for that product are growing. AutoCAD WS, a cloud-based CAD editor from Autodesk, enables you to view, edit, and share AutoCAD drawings via a web browser or app installed on your iOS or Android mobile device. Introduced in 2010, WS has since been updated to include features for pinning photos to specific locations within drawings, as well as organizing comments within drawings.
The new API is currently only supported on Apple’s iOS, although support for Android devices will be added in future versions. You can read Autodesk's tutorial about the new API on the AutoCAD WS web site, "Launch AutoCAD WS App API."
The new API joins two previously introduced APIs. One of those allows users to embed links to AutoCAD WS in mobile apps in a manner similar to that of the new API. The other enables using WebDAV (Web Distributed Authoring and Versioning) to perform various operations on files and folders stored online in an AutoCAD WS account. WebDAV is an extension of the Hypertext Transfer Protocol (HTTP) that enables accessing files stored on World Wide Web servers.
Although useful to end users, the APIs have been developed largely due to developer requests, said Ilai Rotbaein, Autodesk product manager for AutoCAD WS. “Developers were asking for ways to integrate WS with other applications,” said Rotbaein.
A tutorial is also available about how to "Embed AutoCAD WS," which can be a good introduction to WS APIs. To embed AutoCAD WS in an application, you don’t have to be an experienced programmer. You can get a feel for this by simply copying the following code, opening a text editor such as Notepad, then pasting the code into a blank file.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <iframe src="http://www.autocadws.com" width="850" height="700"> </iframe> </head> <body> </script> </body> </html>
Save the file as a text file, but replace the TXT file extension with HTM (for example, TestACADWS.HTM). Open the file in a Web browser, and you should see the AutoCAD WS interface, as shown in the image below. (To actually open AutoCAD WS, however, you will need to create a free WS account.) This example is a simple HTML file that can be accessed from a Web browser for demonstration purposes.
The AutoCAD WS interface, as displayed by our HTML file for demonstration purposes.
The sample HTML code would need to be tailored to work on various mobile devices. The main line of code is the <iframe> line that places the AutoCAD WS home page in the iframe element, which places another HTML document in a frame.
More Options on the Horizon
According to Rotbaein, more APIs are coming for AutoCAD WS in the next year. “This is the first step,” he noted. Possibilities include support for Dropbox and other cloud services.
About the Author: Andrew G. Roe
In her easy-to-follow, friendly style, long-time Cadalyst contributing editor Lynn Allen guides you through a new feature or time-saving trick in every episode of her popular AutoCAD Video Tips. Subscribe to the free Cadalyst Video Picks newsletter, and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!