(Formely I/O).
This is a Python sample code for Design Automation API (v2). It is a very short demo at this moment which shows getting token and checking the status of one existing workitem only. More functions will be added in the future.
- Download Python. The code can work with old version such as 2.7, but it is recommended to use the new version.
- Forge Account: Learn how to create a Forge Account, activate subscription and create an app at this tutorial. Make sure to select the service Design Automation.
- Make a note with the credentials (client id and client secret) of the app.
- Follow the steps on API Basic to create a test codes with full workflow: create activity, create workitem, create app package (if needed). Make a note with the workitem id. Another choice is to check some samples (prefix with "design automation") on Autodesk-Forge Github Repository such as design.automation-workflow-winform-sample. Build the sample and get a workitem id.
- run acadio.py with the credentials and workitem id like:
-
- acad-da.py --client_id [you client id] --client_secret [your client secret] --workitem_id [your work item id]
- wait for the response about work item status. It will also download the log file
- as of writing, only AutoCAD Design Automation is released. While the skeleton of this sample could apply with other products (such as Revit, Inventor) after replacing the endpoints.
These samples are licensed under the terms of the MIT License. Please see the LICENSE file for full details.