BIM models with metadata

With Onirix you can import your BIM models generated from engineering departments, which also have relevant metadata and information. This helps to unify in one place all the information of these models, their materials, measurements, colours, etc.; without having to manipulate different types of files, physical manuals, etc.

ifc-model-metadata-sample

Thanks to this import, which can be done easily and in a matter of minutes, you can visualise your models with the information associated with each part in a simple way, both in a web environment on a PC and in augmented reality.

For the moment the types of files compatible with Onirix are IFC files.

Through the Onirix Embed SDK you will be able to interact with the metadata of your models. You will be able to get the metadata of the exact point where the user touches or you will be able to ask the model for its data. Let's take a closer look

Get model metadata

When a user touches an element of the experience, three events are generated that we can capture through the EmbedSDK: ELEMENT_CLICK, ON_TOUCH_START and ON_TOUCH_END

All three events return a params object. If the element point where I touch the user has metadata, we can access it through params.metadata.

embedSDK.subscribe(OnirixEmbedSDK.Events.ELEMENT_CLICK, (params) => {
    console.log(`Element ${params.oid} metadata`, params.metadata);
});

embedSDK.subscribe(OnirixEmbedSDK.Events.ON_TOUCH_START, (params) => {
    console.log(`Element ${params.oid} metadata`, params.metadata);
});

embedSDK.subscribe(OnirixEmbedSDK.Events.ON_TOUCH_END, (params) => {
    console.log(`Element ${params.oid} metadata`, params.metadata);
});

You can see a complete example in Github

Ask for model metadata

It is also possible to access a specific part of the metadata of an element. The getMetadata function allows us to obtain data based on a query parameter that will serve as a search pattern within the asset data of the element.

There are several options for the query field value:

  • A number that corresponds to the node's line ID.
  • A string that corresponds to the node's globalId or name. If the string is *, it matches anything.
  • A RegExp that matches the node's name.
  • The node's path, which is an array of numbers, strings, or RegExps. The first element of the path should match the root node of the element, the second with one of its children, and so on. Each value in the path follows the rules described above to match elements. For example, ["abc123", "*", /Hello/, 3].
const metatada = await embedSDK.getMetadata(ELEMENT_OID, query);
console.log(`Element ${ELEMENT_OID} queried metadata`, metadata);

See the Embed SDK documentation for more information about the getMetadata method.

You can see a complete example in Github

Results