Reputation: 13
I have dbId and externalId in forge viewer. I want to get some value of properties object from this dbId and externalId. For example: Perimeter, Area, Volume, ...
What is the syntax to do that?
Upvotes: 0
Views: 1528
Reputation: 1288
Once you have the DBID for the element which you can obtain with a viewer call to the selection of the object. viewer.getSelection()
will give you that DBID that we will use later.
You can use the method getProperties(dbid, callback)
For example something like this.
var myDbid = viewer.getSelection();
viewer.getProperties(myDbid, function(e){
console.log('Entire object response ',e);
console.log('Properties ',e.properties)
});
This should give you the information of the category you are looking for.
Upvotes: 1