'Render a subset of model elements in Autodesk Forge Viewer

We need to be able to render a subset of BIM model elements and also dynamically color some elements. Based on this article it looks like it’s possible to render a subset of elements given you can provide a list of their dbIds. It also looks like Forge viewer API uses dbIds to interact with rendered elements.

Before converting the BIM model to SVF2, we assign our own ids to model elements. I can see our own ids as properties of model objects when accessing the properties database of the model in the browser. It would be great if we could generate a list of associations between our ids and forge dbIds.

Does autodesk provide an API to fetch custom properties or is there a way to correlate the dbId at upload time?



Solution 1:[1]

You can use this endpoint GET Properties from the ModelDerivative API and search for your own id in properties. You will get the dbid of your object and then build your collection of associations.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 AlexAR