Interacting with IFC GUIDs

To interact with the viewer you will need to use objectIds. When the model is processed objects are given unique objectIds. These objectIds are guaranteed to be unique within the model and across revisions. This is done because IFC GUIDs are unique to each object which may exist in multiple models and/or revisions.

However, you may find you need to interact with the viewer using IFC GUIDs. For this you will need to translate between IFC GUIDs and objectIds.

Translate IFC GUIDs to objectIds

1. Invoke the query method

Provide the IFC GUIDs you want to get the objectIds for.

JS


2. Use the returned objectIds

The query method returns an array of objectIds that match the specified IFC GUIDs. You can then use these objectIds to interact with the viewer.

Translate objectIds to IFC GUIDs

1. Invoke the getProducts method

Provide the objectIds of the objects you want to get the IFC GUIDs for.

JS


2. Extract the IFC GUIDs from the returned products

The IFC GUID is the value of the GlobalId attribute for each object.

JS