This repo contains supporting files, scripts and documentation that can help streamline onboarding and running Dynamo graphs in Design automation for Revit.
- Create an
AppBundle, a collection of dlls that represents a revit cloud addin. - Publish an
Activity, metadata that describes some of the characteristics of the job that will run your AppBundle, like the inputs and outputs. - Upload files to
Cloud Storage, the files that will be referenced by the Activity. - Submit a
WorkItem, a job. - Download the
Results.
Revit add-in on Design Automation Walkthrough
- Go to APS Developer portal.
- Create an app.
- Grab the Client ID and Client Secret.
- Clone this repo to your local system.
- To use postman, download and install it from here.
- There are 2 files you need to import in the postman app, a collection and an environment file.
- Set the current environment to the loaded DA4DynamoRevit

- Set the work directory in postman to the location where you cloned this repo locally

For general instructions see the Walkthrough.
Below there are instructions on how to use postman to run design automation work items.
Switch to the Execute a Dynamo Revit Add-in collection and go through the Tasks one by one.
Some of the tasks also contain Delete commands which can be helpful if you want a clean slate.

-
Task 1 - Convert Revit Add-in.
- The addin is already created and you find it at DynamoRevitDA.zip.
- If you need to use python nodes please also see pythonDependencies.zip.
- If you need to run dynamo packages, you can zip up the packages in a single zipped with the name
packages.zip. See this example packages.zip.
-
Task 2 – Obtain an Access Token.
- Run the
Get an Access Tokenrequest in theTask 2 - Obtain an Access Tokensection of the postman collection.
- Run the
-
Task 3 – Create a Nickname.
- Run the
Create Nicknamerequest in theTask 3 - Create a Nicknamesection of the postman collection.
- Run the
-
Task 4 – Upload the AppBundle.
- Register the AppBundle by running
Register the AppBundlerequest. - Upload the AppBundle by running the
Upload the AppBundlerequest. - Create an alias for the AppBundle by running the
Create an Alias for the AppBundlerequest.
- Register the AppBundle by running
-
Task 5 – Publish an Activity.
- Create a new Activity by running the
Create a New Activityrequest. - Create an alias for the Activity by running the
Create an Alias to the Activityrequest. Notes:
The activity must use specific parameters to be compatible with the dynamo AppBundle.
-
parameters - the DynamoAddin requires the following parameters (but not limited to):
- An
.rvtfile (get parameter) on which to operate (will be automatically opened as the current revit model). You can use DeleteWalls.rvt as an example. - A
run.jsonfile (get parameter). This must respect the Player specifications for a GraphRunRequest. You can use run.json as an example. - A
pythonDependencies.zip(get parameter). This zip can be downloaded from pythonDependencies.zip. It contains the Python.Included.dll and Python.ScyPy.dll normally included with Dynamo out of the box. These must be uploaded separately from Dynamo because they are too large to bundle up with the DynamoAddin (DesignAutomation has a size limit on the AppBundles you can upload set at 100 MB). - A
result.json(put parameter) can be included. This file will contain the graph run output (as produced by Dynamo Player). - A
result.rvt(put parameter) can be included in order to download it. This file will contain the provided revit model after the dynamo run.
Here is an example of an activity:
curl -X POST 'https://developer.api.autodesk.com/da/us-east/v3/activities' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -d '{ "id": "DeleteWallsActivity13", "commandLine": [ "$(engine.path)\\\\revitcoreconsole.exe /i \"$(args[rvtFile].path)\" /al \"$(appbundles[DynamoDATest].path)\"" ], "parameters": { "rvtFile": { "zip": false, "ondemand": false, "verb": "get", "description": "Input Revit model", "required": true, "localName": "$(rvtFile)" }, "runRequest": { "zip": false, "ondemand": false, "verb": "get", "description": "Input Revit model", "required": false, "localName": "run.json" }, "pythonLibs": { "zip": true, "ondemand": false, "verb": "get", "description": "Python libs", "required": false, "localName": "pythonDependencies" }, "dynResult": { "zip": false, "ondemand": false, "verb": "put", "description": "Results", "required": false, "localName": "result.json" }, "rvtResult": { "zip": false, "ondemand": false, "verb": "put", "description": "Results", "required": false, "localName": "result.rvt" } }, "engine": "Autodesk.Revit+2026", "appbundles": [ "DynamoDATest.DynamoDATest+test" ], "description": "Deletes walls from Revit file." }'
- An
- Create a new Activity by running the
-
Task 6 – Prepare Cloud Storage.
- If not already created, run the
Create a Bucketrequest to create a bucket for all storage items. - The get parameters described at the previous step must be uploaded as individual files. Run all the requests in the
Task 6 - Prepare cloud storagefolder.- The
.rvtfile - run the tasks inside theRvtFilesubfolder. - The
run.jsonfile - run the tasks inside theRvtFilesubfolder. - The
run.dynfile - run the tasks inside theRvtFilesubfolder. - The
pythonpythonDependencies.zip- run the tasks inside theRvtFilesubfolder. - The
packages.zip- run the tasks inside thepackages.zipsubfolder.
- The
- If not already created, run the
-
Task 7 - Submit a WorkItem.
- Submit a workitem by running the
Create a WorkItemrequest. - Check the work status by running the
Check Status of a WorkItemrequest.
Here is an example of an activity:
curl -X POST 'https://developer.api.autodesk.com/da/us-east/v3/workitems' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer <ACCESS_TOKEN>' \ -d '{ "activityId": "DynamoDATest.DeleteWallsActivity7+test", "arguments": { "rvtFile": { "url": "urn:adsk.objects:os.object:dynamodatestbucket/DeleteWalls.rvt", "verb": "get", "headers": { "Authorization": "Bearer <ACCESS_TOKEN>" } }, "runRequest": { "url": "urn:adsk.objects:os.object:dynamodatestbucket/run.json", "verb": "get", "headers": { "Authorization": "Bearer <ACCESS_TOKEN>" } }, "pythonLibs": { "url": "urn:adsk.objects:os.object:dynamodatestbucket/da_files/pythonDependencies.zip", "verb": "get", "headers": { "Authorization": "Bearer <ACCESS_TOKEN>" } }, "dynResult": { "url": `urn:adsk.objects:os.object:dynamodatestbucket/result.json`, "verb": "put", "headers": { "Authorization": `Bearer <ACCESS_TOKEN>` } }, "rvtResult": { "url": `urn:adsk.objects:os.object:dynamodatestbucket/result.rvt`, "verb": "put", "headers": { "Authorization": `Bearer <ACCESS_TOKEN>` } } } }'
- Submit a workitem by running the
-
Task 8 - Download the Results
- Run the
Get S3 Download URL for Resulting RVT fileandDownload Resulting RVT Filetasks to download the revit file. - Run the
Get S3 Download URL for result.jsonandDownload Result.jsonto download the dynamo output. The result will look like this
- Run the
You can perform above tasks using scripts in this repository.
Important
Copy .env.example and save it as .env and fill in the CLIENT_ID and CLIENT_SECRET and update other fields as needed.
Important
- Install jq.
- Prepare environment variables.
- You can use direnv to load values from
.envas environment variables. - Alternatively, you can copy use an
.envrcfile..envrc.exampleand save it as.envrcand source itsource .envrcto load the environment variables.
- You can use direnv to load values from
You use these bash scripts to perform all of the tasks listed above. e.g ./scripts/get_appbundles.sh.
-
Task 1 - Convert Revit Add-in
- Download addin -
./scripts/download_artifacts.sh
- Download addin -
-
Task 2 – Obtain an Access Token
- Get access token -
./scripts/get_access_token.sh
- Get access token -
-
Task 3 – Create a Nickname
- Create nickname -
./scripts/create_nickname.sh <nickname>
- Create nickname -
-
Task 4 – Upload the AppBundle
- Register the AppBundle -
./scripts/register_appbundle.sh <app_id>=> output<appbundle_json> - Upload the AppBundle. Use DynamoRevitDA.zip. -
./scripts/upload_appbundle.sh <appbundle_json>. - Create an alias for the AppBundle. -
./scripts/create_appbuldle_alias.sh <app_id> <app_alias> - Create a new version of the AppBundle. -
./scripts/update_appbundle.sh <app_id> - Point the alias to the new version of the AppBundle. -
./scripts/update_appbundle_alias.sh <app_id> <app_alias> <app_version>
- Register the AppBundle -
-
Task 5 – Publish an Activity
- Create activity -
./scripts/create_activity.sh <nickname> <app_id> <app_alias> <activity_id>=> outputactivity.json - Create activity alias -
./scripts/create_activity_alias.sh <activity_id> <activity_alias> - Download report. Report will look like this -
./scripts/download_report.sh
- Create activity -
-
Task 6 – Prepare Cloud Storage
- Create bucket -
./scripts/create_bucket.sh <bucket_key>=> outputbucket.json - Create signed upload url -
./scripts/create_signed_upload_url.sh <bucket_key> <object_key>=> output<object_key>_upload.json - Upload file to bucket -
./scripts/upload_to_bucket.sh <upload_json> <file> - Complete upload -
./scripts/complete_upload.sh bucket_key> <object_key> <upload_json>
The get parameters described at the previous step must be uploaded as individual files:
- The
.rvtfile - The
run.jsonfile - The
run.dynfile - The
pythonpythonDependencies.zip
- Create bucket -
-
Task 7 - Submit a WorkItem
- Create workitem -
./scripts/create_workitem.sh <nickname> <activity_id> <activity_alias> <bucket_key>=> outputworkitem_<timestamp>.json - Get workitem status -
./scripts/get_workitem_status.sh <workitem_id>=> outputworkitem_<workitem_id>.json - Get report -
./scripts/get_report.sh <workitem_status_json>=> outputreport.txt
- Create workitem -
-
Task 8 - Download the Results
- Create signed download url -
./scripts/create_signed_download_url.sh <bucket_key> <object_key>=> output<object_key>_download.json - Download result -
./scripts/download_result.sh <download_json> <file>
Result will look like this
- Create signed download url -
Only the postman collections have a working example The only 2 sections that are specific for cloud models are:
- Task 5 - Create a Revit Cloud Model Activity
Here we create an activity without requiring a revit file input to be supplied
- Removed the
/i \"$(args[rvtFile].path)\"part from the "Commandline" - Removed the
rvtFileparameter - Added a new
setupparamter to specify the location of the cloud model
- Removed the
- Task 7 - Create a Revit Cloud Model WorkItem
Here we adjust the Workitem for the Activity described above
- Added a new argument
"setup": { "url": "data:application/json, {'SaveRevitFile': true, 'CloudModel': {'Region': 'US', 'ProjectGuid': '3e0d80bb-a0fd-4930-84f8-72ff40ef12d2', 'ModelGuid': 'ff4e6d0b-5c64-41ce-9292-617e1c61296c'}}" } - Added a new argument
This is necesary for DA to be able to open cloud shared models. The adsk3LeggedToken can be generated by following these steps https://aps.autodesk.com/en/docs/design-automation/v3/developers_guide/revit_specific/revit-cloud-model-integration/#authentication-requirements
"adsk3LeggedToken": "dummy_value"
- Added a new argument
Important
Install nodejs.
Run npm install
You can also use this js script for all the update tasks once the resources are created. e.g node design_automation.js all.
- Run
node design_automation.js allto set up all tasks (from 2 to 8) - You can also run individual tasks, by specifying one or more of the following arguments:
nick- Creates a nicknamebundle- Creates an app bundleactivity- Creates an activityrvt- Uploads the revit filepython- Uploads the pythonDependencies.ziprun- Uploads the run.json requestwork- Creates and submits a WorkItem requestresult- Polls for results (ands saves the results locally log.txt, result.json and result.rvt)
Design Automation Tools portal.
Tip
You can also see your AppBundles, Activities and WorkItems in Design Automation Tools portal.

Autodesk Platform Services vscode extension.
Tip
You can browse your APS resources in VSCode with Autodesk Platform Services extension.
