0xvivi / design.automation-python-tutorial

Design Automation sample in Python: Shows how to get token and check the status of one existing work item

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Design Automation API sample in Python

(Formely I/O).

ver Design Automation Platforms Python License

Description

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.

Thumbnail

thumbnail

Setup

Dependencies

  • Download Python. The code can work with old version such as 2.7, but it is recommended to use the new version.

Prerequisites

  1. 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.
  2. Make a note with the credentials (client id and client secret) of the app.
  3. 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.

Running locally

  1. 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]
  1. wait for the response about work item status. It will also download the log file

thumbnail

Further Reading

Limitation

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

License

These samples are licensed under the terms of the MIT License. Please see the LICENSE file for full details.

About

Design Automation sample in Python: Shows how to get token and check the status of one existing work item

License:MIT License


Languages

Language:Python 100.0%