autodesk-forgeautodesk-model-derivative

APS - Get leaf dbid without using viewer


Does anyone know the most efficient way to to retrieve all leaf dbid without using the viewer ?

in my head I want to pass an dbid into a function and it return all the leaf objects.


Solution

  • Leaf nodes are the ones without children.

    Through the GET Fetch Object Tree endpoint you can traverse the structure to collect all the leaf nodes dbIds.

    With that, you can query their properties using GET Fetch All Properties or POST Fetch Specific Properties