Delete model groups that do not contain values

Hi guys,

The building company I work for is trying to push down the volume route a little further. We’ve currently set up our revit models with 7 different facade types (a,b,c,d,e,f,g) to choose from and then 3 different finish levels internally (x,y,z), both facades & finishes are model groups.

I’m trying to make the process quicker and more user friendly where you open dynamo, enter that you would like facade a deleting b,c,d,e,f & g and then finish x deleting y & z.

The process that has been undertaken at the minute is to go through and delete each model group independantly and I’m sure this can be automated quite easily however I’m a bit of a newbie and cant quite work it out.

Any help I can get would be great.

Hi Brodie.
Have you started with something that you could show us?

I don’t know how your model is built up but if you have elements with a parameter name that you set to (a,b,c,d,e,f,g) you could get the parameter value and then filter it out like they do in (How to filter string list by string) and then use a “Delete” node to delete the models that are filtered out.

Are the model groups just named a,b,c or do they inside them have a parameter value named a,b,c?
Because if they are just named a certain way you should be able to make script where you “collect” the model groups, do a filter like in the thread above and then delete.

I am not on my PC now but will check in Dynamo later.