Transposing Data

So I have a Generic Annotation for Markup Purposes that I have a “Mark” parameter (text) that I want to populate the referring Sheet Number the View is on. I currently have it there to manually input it’s location to a sheet.
I believe I’ll have to do a Code Block to capture the hard coded “Sheet Number” parameter for the View. So, what methods (nodes) would I need to look at to “transpose” that info into my “Mark” parameter in my Gen-Anno family. If anyone could provide similar solutions & or links in the forum to this Dynamo Noob. Thank you.

Edit: …& if the Sheet No. is null to then take the View Name to copy over into the “Mark” parameter.

A good tool to learn more about Dynamo would be the Dynamo Primer if you are interested in learning more. In it, it also explains how to retrieve and set parameters of Revit elements. I would strongly recommend reading through it and at least a few tutorials on this website as well (at the top, you can click Learn to find more resources and video tutorials).

As for your question, there are built in GetParameterByName and SetParameterByName nodes that would do exactly what you want. Just feed it an element or list of elements and a string that has the Parameter name (“Mark”). Like all programming, things are case sensitive and capitalization is important.

For ‘if the sheet no. is null’, a simple if statement would work. Try out what you can on your own and if you get stuck, come back and we can help you work through it.

1 Like