Using Dynamo to filter families from a type catalog based on an excel workbook


I am wondering if it is possible to write a script that loads a family with an associated type catalog into a file and filters the type selection based on an excel spreadsheet.

I have a large number of families cached within a type catalog and I want to load 2 or 3 three of the families within the type catalog into my model. Our firm has a standard naming convention and so I know the names of the families I am looking for, it is simply a bother to have to manual scroll through the type catalog every time I want to load these families.

In addition to the naming convention, we have an excel spreadsheet that tracks the families we are working with. I have already got my family name tracked as a value within the spreadsheet.

Is there a way to write a script to load a family and automatically filter the types loaded from the type catalog based on the preexisting spreadsheet?

I’m not sure if this is specifically for type catalogs or not as it doesn’t seem to actually say, but this seems like a starting point.

@Nick_Boyts hello again!
I’ve tried a couple of the codes from the staring point you provided.
Where do I put the code? I’ve tried putting it in a python node and in a code block but neither has been successful. Code below. Does the code below require some other lines of code for it all to work?

public bool LoadFamilySymbol(
	string filename,
	string name,
	out FamilySymbol symbol

This would be better as a new topic rather than reviving a 5 year old thread.

The code you have (and the code examples for most Revit API documentation) is not in Python. You need to “convert” this code to Python syntax in order to utilize it within a Python node. You would also need to write supporting code to handle your inputs, conditions, or other requirements to execute the functionality you’re looking for. There are plenty of Python references here on the forums and elsewhere. I suggest you start there.

1 Like

Thank you!