Excel to Revit Families sorted via Excel Value

Hi All,

I am a noob to Dynamo but the script I would like to put together involves retrieving a parameter value(P&ID Number) from an element and then fill that element with values assigned to that P&ID number in the excel row. Can anybody offer me some guidance on this? Currently I know how to retrieve data from Excel and fill families of a certain type with data but I want to fill them by their P&ID Numbers. I’d greatly appreciate any help, thanks.

E

Is that more or less the same?

Hi Miguel,

I think it is a similar idea yes, see attached script, I am trying to find the value for P&ID in excel and find the element with the corresponding parameter with that P&ID Number and then populate the rest of the parameters associated with that p&id. The P&ID is the common denominator TRIAL 1.dyn (24.2 KB)

You could also use Classification Manager or a lookup table for something like this.

I probably could, but I want to learn Dynamo. I think this is nearly like an IF/ELSE STATEMENT. If the value of P&ID in excel = X then populate parameters in selected family from that row. ELSE return Null

That’s one option. You end up with nulls for every non-matching item though - easy enough to clean up but a bit messy.

You have other options like matching indices, filtering, or just using Python that are a little more “standard practice”.

Thing is Nick, I am a complete beginner :laughing:

Gotta start somewhere! :wink:

CAD OUTPUT.xlsx (12.7 KB)

This is where I’m at, can somebody offer some guidance?

TRIAL 1.dyn (32.6 KB)

@Kulkul I hear you are a man who knows things, can you help?

@emcinerney Could you share rvt file?

Thanks Kulkul. See attached

Apologies, I think the file is too big

The Revit file literally has two valves in it with project parameters created for every heading in the excel file

Use dropbox or google drive to drop your rvt file and share link here.

@emcinerney Is this what you need?


Here is the dyn file TRIAL 1 (For Eamon).dyn (39.9 KB)

1 Like

thank you for sharing… this helped my improve my version as well… it helped a lot

i tried to use emcinerney models and the shared dynamo script… this is what i seemed to notice…

the script would only consider his entry for 1 of the pipe accessories because of this node.

if you clean the nodes of node, and only get the item and index one, then only the “AA” and the corresponding details will be implemented to the AA assigned element… the BB element does not get assigned parameter details

how could we work around this so that it would remove nulls, then go through all the items under the ID number, and applied them to corresponding elements w/ these numbers?

if we get to trouble shoot this area the code would be perfect and helpful to improve mine

Remove List.GetItemAtIndex node → Connect to List.AllIndices after Remove nulls.

1 Like