In the last tutorial, we learned how to create a Dynamo script to place an element by defining a coordinate. However, running a script from Dynamo can be confusing for someone who doesn’t understand Dynamo. You can share and run the script from a friendly interface: Dynamo Player.
Here is another reason why you want to use Dynamo Player: when you run the script from Dynamo, the elements created are linked to the script. When you rerun it, it doesn’t create additional elements. It deletes the old elements then recreates new elements. If that is not what you want, then you need to use Dynamo Player.
Open the script we created in Dynamo. You should see the script similar to below.
Defining Node as Input
We want the nodes in the red rectangle as our input. We want the users can provide the family type, x & y, and the level. We need to define the nodes as input.
Right click on Levels node then activate Is Input from the contextual menu.
Repeat the process for family types and both numbers node.
Renaming the Node
We have two numbers node in the script. We can easily notice which one is the x value, and which one is
Double click the node label. Dynamo opens Edit Node Name dialog. Rename the numbers node to x
You may rename the other nodes if you think it’s necessary. Save the script and close Dynamo. Remember which folder you save the file.
Using Dynamo Player
You can find the Dynamo Player tool next to the Dynamo.
Click the icon. Revit opens the Dynamo Player. You can see a list of sample script and a play button next to each of them. We want to use our own script. Click Browse to Folder…
Select the folder where you save the Dynamo script. In this tutorial I only have one script in that folder. If you have more scripts in your folder, you will see them here.
Click Edit Inputs to modify the input value. You can see all available input fields as below. Remember, we provided them before!
Change the value and click play. It may take quite a long time at first. After the script is finished, change the value and click play again.
Now you understand the basic of creating a Dynamo script/program and run it on Dynamo Player. We will learn mode about using Dynamo for changing parameters in the next tutorial.