We’re happy to announce that starting our latest version, a new API has been added to the AutoCAD WS mobile app that allows opening AutoCAD WS directly from your own mobile application. With this new capability, you do not have to worry about implementing a viewer or an editor from within your application, you can simply leverage AutoCAD WS to do that for you.
Now you can have all the power of AutoCAD WS integrated with your application with a few simple steps. To open AutoCAD WS from your mobile app, all you need to do is use the new protocol supported by AutoCAD WS. You will need to specify the drawing you would like to open and its path. In the following example, AutoCAD WS will open the “House.dwg” drawing, located in the “ProjectDrawings” folder :
NSString* launchUrl = @"autocad://open?path=ProjectDrawings/House.dwg"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString: launchUrl]];
Please notice that the code above will only allow you to open drawings that already exist in your AutoCAD WS account. If you like 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 (here are a few examples in C# and JS). Another option, as shown below, would be to specify a url that leads to the drawing. In this example, we would like to open a drawing stored in Amazon S3 storage service and use AutoCAD WS to view it :
NSString* launchUrl = @"autocad://open?url=https://s3.amazonaws.com/sample118/Sample.dwg"; [[UIApplication sharedApplication] openURL:[NSURL URLWithString: launchUrl]];
For any questions, please contact us at email@example.com
*Please notice that this API is currently supported in iOS only. Android support will be added in future versions.