Search code examples
autodesk-forgeautodesk-viewerautodesk

Is there a way in Autodesk forge to get entity name with the id that appears in the property panel?


I am trying to get the entire name of a dbId. I am able to get the name using getNodeName() but is there a way to fetch the id as well? I have highlighted the id I need in the image below.

Property panel snapshot:
Property panel snapshot


Solution

  • Since everything you see in the viewer is open source and available through JavaScript, including the property panel that you show in the screen snapshot, the highlighted Revit element id can definitely be accessed. In the worst case, you would simply grab the caption of the property panel window and parse it from that. However, the Revit element id is also accessible from the viewer node properties. It can be extracted from the externalId property, which includes a hex encoding of it. For more details, please refer to the similar previous question on missing Revit ID in instance elements.