Dynamo Player: Using Revit To Run A Dynamo Script

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

1

Dynamo Player

Using Revit to run a dynamo script


Dynamo is a tool for generative design that extends building information modeling with the data and
logic environment of a graphical algorithm editor and lets designers create visual logic to explore
parametric conceptual designs and automate tasks. The Dynamo Player was developed so that the
graphs created in Dynamo would be easily accessible for use by any Revit user, including those who
aren’t using Dynamo.
Dynamo Player provides a simple way to execute Dynamo scripts in Revit. Dynamo Player displays a list
of Dynamo scripts in a specified directory, along with the current status of each script. To use Dynamo
player see below:

• Manage tab Visual Programming panel (Dynamo Player)

Launch a Dynamo script in an Autodesk BIM


project.

1. Open the model in Revit, and open the


required view.
2. Locate the script to run in Dynamo Player.
3. (Optional) If the list is exceedingly long, enter
keywords directly in the (Filter) field to
narrow the search. A filtered list displays.
4. Click next to the script.
A process indicator will show the script is
running.

If the script requires inputs, the Inputs dialog


displays. For details, see Provide Input for a
Script from Dynamo Player.

When complete, the script reports its status as Run


completed or Completed with errors.

When playing a script in Dynamo Player, consider


the following:

• Cancel. Once a script starts running, you cannot cancel it from Dynamo Player. If you want to cancel
the script in progress, switch to Revit and press ESC.
• Undo. To reverse the results of running a Dynamo Player script, use Undo in Revit.
• Language. Match the language of the Dynamo script to the language of the Revit user interface.
Scripts using a different language from the user interface may not run correctly.
2

Editing a script in Dynamo/Dynamo Player


To make Dynamo scripts more adaptable to meet your needs, they can be designed to request user
input before use. Before using Dynamo Player to run the script, you can provide input directly in
the Dynamo Player interface. This feature avoids the need to learn and use Dynamo to make project-
specific adjustments to the script.

Launch Dynamo from the Dynamo Player to edit scripts.

1. Locate the script to be played in Dynamo Player.


2. (Optional) If the list is exceedingly long, enter keywords directly in the (Filter) field to narrow the
search. A filtered list displays.
3. Click next to the script. The script opens in Dynamo.
Edit and save the script as needed.

Setting up a Dynamo script to require input

Before you can use Dynamo Player to run a script that needs project-specific input, the team's script
writer uses Dynamo to prepare the script to request the input.

To prepare the script, the script writer must do the following:

1. Open the script in Dynamo.


2. Right-click a node that needs input, and select Is Input.
3. For any nodes that you do not want exposed in Dynamo Player, right-click a node and clear Is Input.
4. Save the script and share it with Revit users.

Supported input types

Any interactive selection or drop-down user interface (UI) input node in Dynamo works in Dynamo
Player. Dynamo Player supports input for certain types of nodes in a Dynamoscript, including but not
limited to the following:

• Select Model Element • Levels


• Select Model Elements • Boolean
• Categories • Number
• Element Types • Number Slider
• File Path • Integer Slider
• Directory Path • Views
• String • Number From Feet and Inches
3

The specific types of nodes that support input will change over time. As Dynamo users create new node
types, Dynamo Player may not immediately support input for them. Over time, however, Dynamo
Player may support input for those node types, if appropriate.

Unsupported input types

In a Dynamo script, some types of nodes do not support input from Dynamo Player. In Dynamo Player,
these inputs are marked with the text Unsupported Input Type.

When running a script, Dynamo Player ignores unsupported input types.

• If the node has a default value or is not required for the script, the script can run successfully
without resolving the unsupported input type.
• If the script requires a value for that node, the script fails when you run it. To provide a value,
click to open the script in Dynamo, and make changes there.

You might also like