Assign different materials to In-Place components in Dynamo

** Revit File link (only 3 compomenets in revit for simplicity)**

I have 4000 generic model components in a Revit file. Those components are coming from IFC.

I need to assign different materials to these components according to the time schedule. The time schedule will change often, so if I do it manully, it will be a tedious work.

Since there is no material parameter

Step 1: I create “Material” shared parameter and project material and link them together

SP

Step 2 : Then I need to enter “Edit in-place” mode to assign the shared parameter to the “material” property for each components.

Now I exit the “edit in-place” mode and assign material
assign%20material

For Step 2, if I do it in Revit, I have to do it 4000 times.
I want to know if it’s possible to do Step 2 in Dynamo? If it is, then how to do it?

Hi,

You can do such a trick because your file is "Edit-in Place ".

-First specify the "Material " that you want to change in the family and set "instance " by assigning the name.
-Then run the code.


1 Like

Hi Durmus_Cesur

specify the "Material " that you want to change in the family
——but there is no family in the RVT. Do you mean MANULLY assigning material to the ifc column by “edit in-place” in the revit?

I can do it manully for one column, but in my project, I have more than 4000 ifc elements, so I really don’t want to do it manully.

1 Like

Hi,

Use "Edit-İn Place "

Hi,
"Use "Edit-İn Place "
Then I have to do it manully in REVIT, right?

I can do it manully for one column, but in my project, I have more than 4000 ifc elements, so I really don’t want to do it manully.

Hi,

Apologies I’m running out of the office shortly…

I know that if I create a generic model family using FamilyInstance.ByGeometry from Springs, that if I have previously added materials to my generic model family template, I can then apply them…

If you add your materials to the generic model family template before importing your IFC, perhaps that will allow you to apply them through Dynamo?

Apologies if I’m wrong!

Mark

Would it not be easier to isolate and convert the IFC column elements to Dynamo geometry, identify the column type (round/square/rectangular) by reviewing the bottom face/outline and using these figures to place an actual column family with types, materials, codes etc. set up properly?

That way you don’t end up with 4000 family instances by geometry.

Thanks Mark.Ackerley for the tips.
I’m totally new in this area, some questions:

  1. how to add material to the generic model family template?
  2. If I have 4000 ifc elements, do I need to do the above work manully 4000 times?

GavC

Hi, GavC

  1. what do you mean by “isolate”? do I need to “isolate” ifc element 4000 times?

I haven’t used Dynamo to collect IFC elements, but I assume you have converted the IFC into Revit geometry, which in turn converted the columns into in-place generic models.

If there is anything these columns all have in common (such as a name or parameter), you could collect all elements in an active view, filter them so you are only dealing with your column elements, use Element.Geometry to convert them to Dynamo geometry, take the bottom face of the geometry, get boundary as a poly-curve, verify the outline types (arc or rectangular/square).

You could check the diameter for arcs and the long/short side lengths for rectangular/square bases. I would then export these to excel, modify a column family so it contains all of these types (and name them in a way which allows you to tell the dynamo script to match these profiles with family type names - e.g. 400x800).

This would allow you to create actual families with types set up based on the outlines at their base. You would also need to identify their height at base/top to verify their level at base/top and any relevant offsets.

It would be a long script, but if you are dealing with 4000 elements and need to take them into a Revit model for documentation setting up this script should save you a lot of time in the mid-long run.

1 Like

Hi GavC

Thank you for the detailed solution. Unfortunately, 4000 ifc elements have different geometry, not just column as shown in attced rvt file.

1 Like

Sounds like a fun one… crank out the elbow grease I guess. You could try to at least handle the more regular elements using scripting with simpler geometry (maybe by converting to geometry, converting that to polysurface, and filtering out anything with more than 6 surfaces?).

I found this Model-in-Place component convert to Family component.

But it seems like I have to manully convert each element.

I can create a “material” shared paramter and project paramter and link them together.
In revit edit in-place mode, I can assign the shared parameter to element.
Then I can assign required material in the project parameter.

I have to do this 4000 times in revit.

The problem is how to assign the the shared parameter to element (in-place component) in Dynamo?

Hey,

So create a family from template, add the materials, save the family and rename to .RFT.

My thought is that hopefully when IFC imports the objects as generic models, it uses this template… so it would work for all 4000 elements…

Hope that helps,

Mark

Edit: Could you chuck a link to your IFC importer? It would be interesting to see how it works :slight_smile:

Hi Mark.Ackerley

The attached is a simplified version, not 4000 components.
change extension rvt to ifc.
rhino .rvt (32.7 KB)

So if you update this part here?

With a template that has your desired materials?

Does that work for you? :slight_smile:

Hi Mark.Ackerley
I create a family using generic model.rft and apply “Default” material, then save it as Family1.rft.
How do I use it to import IFC, sorry for the ignorance.
Change ext from rvt to rft.
Family1.rvt (344 KB)

Specify Family1.rft as the ‘Default Template for IFC Import’ (as above) and see if it works?

Mark.Ackerley
when assigning the rft, it says “file type RFT is not supported in this dialog”