Hi everyone! I could use some help with a Dynamo script I’m working on. I’ve set up some structural pile caps, which I’ve labeled using a type mark that ranges from A to E. Each mark has an associated SLS loading listed in an Excel sheet. I’ve tagged my pile caps in Revit as typemark.mark + SLS Loading ( with is under identity data in my properties in revit), but I’d like to automatically add the SLS loading to the tags instead of manually entering 400 loads in Revit. How can I create a script to streamline this process? I’ve also noticed that the categories are picking up all the structural foundations present in the model. Any guidance would be greatly appreciated! Please see attached images.
You need to get the right element from revit, then match the right references with the references from excel.
Then you apply the right data onto the parameters associated with the element and you are done.
read up on using dictionaries- that is probably the easiest method.
In your case, make a dictionary from your spreadsheet. The mark would be the key, and the load the value.
Get all the pile cap elements and feed the mark into the key of Dictionary.ValueAtKey
Feed the result into SetParameterByName of the pile cap elements (the SLS Loading parameter)

