File Sharing/Publishing

Customization Options Expand for AutoCAD WS

1 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.

Autodesk recently unveiled an application programming interface (API) for WS 1.5 that allows users to access WS and open drawings directly from other mobile apps, avoiding the need for a standalone drawing viewer. Users with some elementary Javascript or C# programming experience can develop simple applications to leverage the new API.

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.

Test Run

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.

To open a particular drawing, you must specify the drawing name and its path. You can only open drawings that already exist in the AutoCAD WS account. If you want to open drawings that are not stored in AutoCAD WS but are available through another service, you can use WebDAV APIs to upload the file to WS. WebDAV tutorials are available for either JavaScript Client or C# Client. The tutorials demonstrate how to connect to an AutoCAD WS account, perform various file operations, and launch a drawing in the WS web editor. So if you are an AutoCAD user with some programming savvy, check out the tutorials and explore how to develop apps that interact with AutoCAD WS.

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.


Add comment

Note: Comments are moderated and will appear live after approval by the site moderator.

AutoCAD Tips!

Lynn Allen

Autodesk Technical Evangelist Lynn Allen guides you through a different AutoCAD feature in every edition of her popular "Circles and Lines" tutorial series. For even more AutoCAD how-to, check out Lynn's quick tips in the Cadalyst Video Gallery. Subscribe to Cadalyst's free Tips & Tools Weekly e-newsletter and we'll notify you every time a new video tip is published. All exclusively from Cadalyst!
Follow Lynn on Twitter Follow Lynn on Twitter



Poll
Which file format do you use most often for CAD drawing/model exchange?
Native format
PDF
3D PDF
DWF
STEP or IGES
JT
IFC
Other
Submit Vote