revit-ifc icon indicating copy to clipboard operation
revit-ifc copied to clipboard

INQ: Automating IFC Export in Revit 2024 to Use Shared Parameter for Element IDs

Open tsau opened this issue 1 year ago • 3 comments

Inquiry description

Hello everyone,

I'm seeking advice on customising the IFC export process in Revit 2024. My goal is to have the IFC export utilise a shared parameter named as the element ID for each element. This adjustment is crucial because the name of the element when opened in our CNC control program is derived from the element ID, and currently, the only way to change it to match our needs is manually. I discovered that automating this process could significantly streamline our workflow.

I have no experience with .NET programming or the Revit API and have been using the built-in IFC export tool. Is there a method, tool, or script available that can help in writing the shared parameter value to the IFC file instead of the default element ID? Any guidance or examples of similar customizations would be beneficial.

Thank you for any insights or directions!

Revit Version

2024.0.x

IFC for Revit Addon Version

24.x.x

Windows Version

10 22H2

tsau avatar Feb 11 '24 14:02 tsau

Right now, the Tag attribute of each entity that is derived from IfcRoot is the Revit element id. Can you just read that information and use it without having to further modify the IFC file?

AngelVelezSosa avatar Feb 12 '24 23:02 AngelVelezSosa

Using the default element IDs throughout the process would be challenging due to their format and lack of meaningful data for my specific use case. Since my CNC operating program relies on the name of the part from the IfcRoot_Name attribute, it's essential to find a way to customize the IFC export to replace or align this attribute with the shared parameter values from Revit. A solution to automate this adjustment would be very beneficial for streamlining my workflow. image image

tsau avatar Feb 13 '24 15:02 tsau

You can override the name with a parameter IfcName. I'm not sure if it works for parts though.

eibre avatar Feb 14 '24 06:02 eibre