Link numbers to families in order

Greeting,

The script shown as below reads coordinates from csv files and place the same family according to coordinates. I would like to know if there is a way to adjust instant parameters according to another csv file to those placed family’s instant parameter.

The instant parameter I want to change is “Additional clearance“

The highlighted in green is the numbers will be used for the instant parameter.

The Revit and xlxs(csv format is not allow to be uploaded) files are attached.

Thank you very much for the help.

T1 B Exported CSV.xlsx (19.2 KB)

T1 A Exported CSV.xlsx (19.1 KB)

Additional clearance.xlsx (11.4 KB)

Associate numbers from csv to instant parameter.rfa (1.1 MB)

Well, do you have anything that ‘maps’ the number to an Element?

Would be easier if the coordinates and the numbers in one list (in my opinion).

Yeah, I agree… If you started by combining the data, then you you won’t have to worry about keeping the data aligned. You can make a list with points, family type, numbers, whatever and use that as the Value. That being said, if you are very sure about the creation of the CSVs, and it all flows through, you shouldn’t have a problem?

You will probably need 2 transactions… The first to place the family, the 2nd to set the instance parameter. If you search ‘Transaction’ you’ll see an End node which will force Dynamo to stop a transaction and start the next. Rhythm has a node for setting Instance parameters, I think the default Dynamo ones struggle?

Hope that helps,

Mark

1 Like

Since your data is in three locations the I would suggest it is logical to map the data on the station number (or combine your data on the station key using Excel’s data power query - see below)

Build a dictionary of lists and append each piece of data by adding an item to the end by key (i.e. station number)
Then place the family and update the parameter - please note there is a typo in your parameter name. I did not need to close the transaction.

Please note that the start station and end station of curve B do not intersect with the plane of equivalent stations on curve A

Example with all OOTB nodes (and translated in space to make it easier to view)

Excel merged data

1 Like