Community
BIM 360 API Forum
Welcome to Autodesk’s BIM 360 API Forums. Share your knowledge, ask questions, and explore popular BIM 360 API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Clicked object properties

3 REPLIES 3
Reply
Message 1 of 4
frank1556
329 Views, 3 Replies

Clicked object properties

frank1556
Explorer
Explorer

Hello all

is there any example of how to get properties of selected object, like length/volume/area?

Thank you.

0 Likes

Clicked object properties

Hello all

is there any example of how to get properties of selected object, like length/volume/area?

Thank you.

3 REPLIES 3
Message 2 of 4
mikako_harada
in reply to: frank1556

mikako_harada
Community Manager
Community Manager

Hi Zamik, 

 

Which BIM 360 product and API are you using? 

 

Sounds like Forge Viewer?  But want to make sure.


Mikako Harada
Developer Technical Services
0 Likes

Hi Zamik, 

 

Which BIM 360 product and API are you using? 

 

Sounds like Forge Viewer?  But want to make sure.


Mikako Harada
Developer Technical Services
Message 3 of 4
frank1556
in reply to: mikako_harada

frank1556
Explorer
Explorer

Yes, correct.

 

0 Likes

Yes, correct.

 

Message 4 of 4
mikako_harada
in reply to: frank1556

mikako_harada
Community Manager
Community Manager

Hi Zamik,

 

Try something like:

 

    viewer.getSelection()

 

to get selected objects. (Let's say 2210) 

 

    viewer.getProperties([2210], function(elem) {console.log(elem)})

 

to get full properties.


    viewer.model.getBulkProperties([2210], ["Length", "Volume", "Area"], function(elems) {console.log(elems)})

 

to get a partial list. 


Mikako Harada
Developer Technical Services
0 Likes

Hi Zamik,

 

Try something like:

 

    viewer.getSelection()

 

to get selected objects. (Let's say 2210) 

 

    viewer.getProperties([2210], function(elem) {console.log(elem)})

 

to get full properties.


    viewer.model.getBulkProperties([2210], ["Length", "Volume", "Area"], function(elems) {console.log(elems)})

 

to get a partial list. 


Mikako Harada
Developer Technical Services

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report