Swap 1 family for another family in Dynamo

Hi everyone

New here and to dynamo, although I do have some grasshopper experience, so hopefully that translates!

I have a consultants MEP model that contains a ‘MEP fabrication Ductwork’ family with many instance types, I would like to convert all these instances to a generic models. I will then copy these generic models to a different Revit file and use them to cut walls.

The reason for this is because the MEP fabrication Ductworks instances are BWIC penetrations that I need to cut through walls (CLT-cross laminated timber).

The MEP fabrication Ductwork contains a width, depth and length parameters that could be used to map to the width, depth and length of the generic model.

It is possible to swap families in dynamo?

Many thanks

Hi Chris,

Welcome to the forum!

Yes, you can set the element Type parameter to a different element Type.

I would recommend searching the forum, as you will often find similar questions :slight_smile: .How to Change Family Type - #4 by Mohammadz

I would also recommend you run through the Dynamo Primer https://primer.dynamobim.org/ to familiarise yourself with the new nodes and terms.

Best of luck, let us know how you get on!


Hi Mark,

Thanks for the guidance

I have had a look around, for the most part the solutions that I can find are similar to the one you have suggest.

However, this is not really what I am trying to solve.

I’d like to swap families - so ‘MEP fabrication Duct Work’ to ‘Generic Models’

Maybe a simpler way to put it, is there a way to convert families to generic models? In AutoCAD a person can convert most objects to 3D solid/mass elements. Basically something similar to this type of function.

Many thanks

1 Like

Hi Chris,

Sorry about that, yes I understand better now, sadly that is going to require a much more complex solution because you have line based families and need to identify where parts of that line intersect elements in the host file (or visa versa) in order to identify a (centre) point where you need to place your void families (probably hosted).

To answer your question, given that you cannot change a line based family to a point based family, you will find nodes for placing families by point and by line…

I have a graph which does something similar, I place a line based family (which works well because it’s depth is the length of the line)…

Unfortunately you need to deal with the link and the host file and their transforms, which is a world of fun… BiMorph package has some excellent nodes which deal with the transform for you.

You will also need to watch out for Curtain Walls, hopefully you don’t need to cut them, because that will need a different solution.

If you do want to place a line based family (alternatively you could have a series of hosted families, they can return the system family thickness) then you will need to place a detail line in 1 transaction, then delete it in the next, in order to return a reference you can use to place the family…

Given this more complex solution, I would also be looking for error catching to help you understand when the process fails e.g. Someone stops a length of duct half way into a wall…

It is a doozy :frowning: Given you are new to Dynamo, perhaps there is a different workflow which allows you to manually identify intersect points? Or maybe someone else has a better idea?

Best of luck,