Demonstrate the Autodesk View and Data API authorisation and translation process in a Python command line script.
This sample is retired, please refer to other workflow samples.
The workflow-python sample demonstrates the Autodesk View and Data API authorisation and translation process in a Python command line script, pyadva.py.
It closely follows the steps described in the documentation:
- https://developer.autodesk.com > Get Started
At the moment, you should probably take a look at the workflow-curl-view.and.data.api sample using Unix shell scripts and cURL. It is more fundamental than this Python sample and provides more working functionality than what is planned for this sample.
The Python one will be nice to have one of these days, especially because it might be possible to implement it so that it runs on both Unix and Windows. I hope you are already workhng on some flavour of Unix anyway, though.
Standard Python installation, the Python requests library, maybe switch to the Python pycurl library instead.
In order to make use of this sample, you need to register your consumer key, Request your consumer key/secret key from https://developer.autodesk.com. This provides the credentials to save in the file credentials.txt.
prepare a test model in the relative path, say samples/mytestmodel.rvt
replace the default model name at line 50
run the pythin script in any IDE.
migrated by Xiaodong Liang