Question

ifc writer: how to export an existing guid as ifcguid?

  • 3 September 2018
  • 2 replies
  • 2 views

I want to write an ifc file where all objects get a guid from the source.

In my source dataset (rooms) there is already a primary key (in guid format). I want to keep this key in the exported objects (IfcSpace). I have tried to set different attributes with this value (ifc_id, ifc_unique_id, GlobalId), but the ifc writer always generates a new guid for each object.

How can I arrive to export an already existing guid for each object?


2 replies

Userlevel 1
Badge +11

Hi @aristotls,

Have you tried writing your guid attribute out as part of a property set? Perhaps you could make the guid attribute into a geometry trait, then add it onto an existing property set definition, or create a new definition. It won't exactly replace the GlobalId attribute, but you'll have written out your original primary key values. Here is the article that I'm thinking of: AutoCAD to IFC Conversion Example. Hope that generates some ideas!

Thanks for this solution. But I need to write the IfcRoot.GlobalId value. Is there no way to give this value to the ifc writer?

Reply