Script for Revit Schedules - Reading Text Parameters

Hi All,

I’m quite new to Dynamo and I would like to do the following: (Simple Sample Schedule image provided below)…

Ideally what I would like to do is for Dynamo to read the “Name” Parameters (hundreds in the original RVT file) in the schedule. Then, when the name consists or equals to “RETAIL”, Dynamo will automatically assign a value in the “Wattage (W/m²)” field. For Example a numerical value of “200”.

When the “Name” Parameter consists or equals something else, like “OTHER”, it should throw out a value of e.g. - “150”.

Above is the first step, lastly, whenever the “Area” Parameter is greater than 50 m² and the “Name” parameter consists or equals “RETAIL” then another custom numerical value of e.g. “120” should automatically be added to the “Wattage (W/m²)” field.

Is this doable in Dynamo? Where should I start or is this a simple script which someone could help me with so that I can get started and play around with the script on my side?

Thank you in advance!

@RRZAR
Yes this is doable. I assume you know how to get and set parameters to start. Then just using core codes, by if statement (you can chain this one after the other). See below if statement explanation.

This is an option. Others in the forum may have a better way of dealing with this using python or other core nodes.

1 Like

here’s how you can do it…it’s pretty simple. please explore further :slight_smile:

1.dyn (11.5 KB)

Hi @4bimferdie.espiritu,

Thank you for the information, it made the logic behind Dynamo IF-Statements clear. I appreciate your input.

@Mohammadz, I can throw about another 50 scripts your way which I think can be useful in our office workflows! haha

Your script served as a solution for me, as I’m still learning, this helps me to understand Dynamo.

Thank you both!

1 Like

Sure i’m glad it helps