Change Family Type with Python


#1

Hi,

Does anyone know which code to address to for changing the type of a family using Python in Dynamo 0.7.4 ? I need to switch the family symbol of several instances depending on some calculations. The instances are not created with Dynamo, but exist already in the Revit environment. I thought the faminstance.Symbol would help me, but apparently the Symbol attribute is read-only. Any suggestions?

Thx.

Dieter

 


#2

No, that should actually work. I am using faminst.Symbol in the custom node FamilyInstance.SetType in package Clockwork to do exactly what you’re describing. It may however be different when you’re dealing with system families.


#3

Can I use FamilyInstance.SetType to change imported cad geometry to a type of Revit Family? I would like to change the “Room Solids” instances from Dynamo into a mass or generic model in order to manage the materials.

Capture

 

 

 

 

Otherwise, how can I expose the Object Styles settings in Dynamo?

objectstyles

 


#4

Changing an import instance into a mass or generic model will not work by changing the family type.

With regard to your second question: you can expose most of the object styles (material, line colour, line weight) via the category but as far as I know nobody has created a custom node for that yet.


#5

How about this? http://archi-lab.net/?p=510 Does that get you closer? This exposes line styles if i remember correctly.


#6

I don’t see any Elements types that get at Imported Geometry Materials. I think I would have to learn to write a custom node or write a Node that grabs room boundaries and then turns them into mass families.