Change materials of family objects

Hello,

In a project, I have accessory pipe families, where I would like to change the materials of all the “objects” contained in the family

I have a shared parameter Materials1 with a definition of a material (in the script, I change this definition)

Then for all the objects contained in the family, I want to associate the Material parameter with my Material1 parameter

My problem is that I cannot find a node to have the List of “objects” contained in my family

(Translate with Google :blush:)



Hi @alain.hamel
If the objects are nested families, in a project you can use the node FamilyInstances.RetrieveNestedComponents (Rhythm package), and in a family the node Family.GetNested (Orchid).

Hello,
No nested families, just extrusions

In a family you can use SelectModelElements (window selection), but i guess you want to do it for several families in the same time

did you try All Elements of Type ?
element of type

I am in the project at the base, not in the family editor

You can stay in a project and open several families in the background using some nodes from GeniusLoci or Orchid Packages.

there may be a lot of family. No way to do it without the editor?

If i undestand what you want to do (add a material parameter to the extrusions contained in several families), as far as i know you can not do it in a project, you have to edit the families to modify them. You can do it by batch using dynamo.

Changing the default material in the Object Style tab won’t solve your problem ?

no, it’s not for all families. the materials may change depending on the type

Correct - without going into the family environment you can’t modify the contents of the family itself, only parametric content (ie: parameter values, location points) can be adjusted in the family environment.

So I need another approach …
Thank you for your comments, I had been looking for a solution on the site for 2 days.

Opening the family first and then running the graph should resolve. Make that work on one family, and then you can try using Dynamo for Automation or other means to bulk process a list of files.

What is the best approach for you?
Edit from the background project in the editor or open in the editor from a directory?