Skip to content

Latest commit

 

History

History
64 lines (35 loc) · 3.64 KB

File metadata and controls

64 lines (35 loc) · 3.64 KB

Task 5 - Create an Activity

An Activity is an action that can be executed in Design Automation. You create and post Activities to run specific AppBundles.

Create a New Activity

  1. On the Postman sidebar, click Task 5 - Create an Activity > POST Create a New Activity. The request loads.

  2. Click the Body tab. Observe the body parameters.

    Body tab of Create Activity

Notes

  • id is the name given to the new Activity.
  • commandLine is the command run by this Activity
    • $(engine.path)\\\\revitcoreconsole.exe - The full path to the folder from which the engine for Revit executes. The engine is defined in the request body as "engine": "Autodesk.Revit+2024". Do not edit or alter this commandLine in the request body of Activity posts.
    • $(args[rvtFile].path) - The full path to the folder that contains the input Revit model. rvtFile is the parameter that represents the Revit model to which the Activity DeleteWallsActivity applies the AppBundle. The AppBundle is defined in the request body as "appbundles": [ "{{dasNickName}}.DeleteWallsApp+test" ].
  • engine is the Design Automation engine that the Activity (Revit 2024 in this case) runs on.
  1. Click Send. If the request is successful, you should see a screen similar to the following image.

    Successful creation of an Activity

Create an Alias to the Activity

Design Automation does not let you reference an Activity by its id. You must always reference an Activity by an alias. Note that an alias points to a specific version of an Activity and not the Activity itself.

To create an alias named test, which refers to version 1 of the DeleteWallsActivity:

  1. On the Postman sidebar, click Task 5 - Create an Activity > POST Create an Alias to the Activity. The request loads.

  2. Click Send. If the request is successful, you should see a screen similar to the following image.

    Successful creation of Alias

Update an Existing Activity

Design Automation does not let you overwrite an Activity once you have created it. If you want to modify/update an existing Activity, you must update it as a new version. If you try to overwrite an existing Activity, Design Automation for Revit throws a 409 Conflict error.

To create a new version of an Activity:

  1. On the Postman sidebar, click Task 5 - Create an Activity > POST Update an Existing Activty. The request loads.

  2. Click the Body tab. Observe the body parameters.

  3. Click Send. If the request is successful, you should see a screen similar to the following image.

    Successful update of an existing activity

Assign an existing Alias to the updated Activity

Currently, the Alias test points to version 1 of the Activity. You send a PATCH request to assign this Alias to the new version of the Activity DeleteWallsActivity.

To send the PATCH request:

  1. On the Postman sidebar, click Task 5 - Create an Activity > PATCH Assign an Existing Alias to the Updated Activity. The request loads.

  2. Click Send. If the request is successful, you should see a screen similar to the following image.

    Successful update of Alias

◀️ ▶️