API Basics

The following concepts are used throughout the documentation:
Term | Definition |
---|---|
Activity | An action that can be executed within the AutoCAD core engine.
For example, this could be the plotting of a DWG to a PDF file or the updating of the CAD
standards currently applied to a drawing.
|
AppPackage | A module referenced by an Activity in order to perform specific functions.
For example, this might be a custom AutoLISP routine that extracts Xdata attached to objects
in a drawing or a script file that plots a DWG to a PDF file.
|
module file | An AppPackage entity.
|
WorkItem | A job that is submitted to and executed by the AutoCAD core engine.
A WorkItem is used to execute an Activity; the relationship between an Activity and WorkItem
can be thought of as a “function definition” and “function call”, respectively.
Note: Once a WorkItem is created, it cannot be modified.
|
Engine | The actual processing engine that runs the WorkItem job and processes the Activity.
Two engines are available: AutoCAD 2015 and AutoCAD 2016.
|
Typical Workflows
Using a Custom Activity
This workflow is used when you need to create a new Activity and associate one or more AppPackages that define the custom programs or scripts to be executed on one or more drawings.
- Optionally, upload any custom programs or scripts to be assigned to an AppPackage and associated with a custom Activity to a specified cloud storage provider.
- Upload any files to be processed and referenced by the WorkItem to a specified cloud storage provider.
- Use POST AppPackages to create a new AppPackage.
- Use POST Activities to create a custom Activity.
- Use POST WorkItems endpoint to submit a job for your Activity to the core engine. The WorkItem begins the execution of the custom programs or scripts defined in the AppPackages associated with the Activity passed to the WorkItem.
- Poll GET WorkItems(‘:id’) to check the current status of the WorkItem before trying to download the processed file(s).
- Download the processed file(s) from the specified cloud storage provider.
Using a Pre-Existing Activity
This workflow is used when you want to execute an Activity that was previously created on one or more additional drawings. The Activity to execute will already have had the necessary AppPackages associated with it.
- Upload any files to be processed and referenced by the WorkItem to a specified cloud storage provider.
- Use the POST WorkItems endpoint to submit a job for a pre-defined Activity to the core engine. The WorkItem begins the execution of the custom programs or scripts defined in the AppPackages associated with the Activity passed to the WorkItem.
- Poll GET WorkItems(‘:id’) to check the current status of the WorkItem before trying to download the processed file(s).
- Download the processed file(s) from the specified cloud storage provider.