How to get DbID to filter in a scene from Autodesk Forge AR / VR Toolkit

73 views Asked by At

Hi I would like to know how to get DbID to filter in a scene from Autodesk Forge AR / VR Toolkit.

enter image description here

I tried to get it from the sqlite that it generates when using the forge-convert-utils tool but from the same object I got several DbIds. I would like to know if there is any other method to obtain this data.

1

There are 1 answers

0
Petr Broz On

Object IDs (or dbIDs) can be retrieved in different ways, for example:

  • using the official GET :urn/metadata/:guid/properties endpoint which returns a JSON with all your objects' properties including their ID.
  • with the Viewer APIs after loading the model into the viewer, for example, using the getSelection or the search method.
  • as you already pointed out, you can also retrieve your model's properties in form of a sqlite file, and query object IDs from there.

Note that every object has its own, unique ID. I'm not sure how exactly you were querying the sqlite database but perhaps you'll need to make the query more specific.