I have created small web app which can able to render revit model using Forge Viewer, now i want to extend to next level. there is any way to fetch URN of each object on click event. here object refer to mechanical equipment.
Asked
Active
Viewed 190 times
-1
-
What exactly were you referring to by `URN`? Node ID (dbid) of the chose component or were you aggregating several models? Because URN is a document (model) level identifier... – Bryan Huang Jun 01 '20 at 12:49
-
Hey @BryanHuang, i want to open new web page with that particular selected object(single object). single object should be there – dhinchak developer Jun 02 '20 at 06:32
1 Answers
0
i want to open new web page with that particular selected object(single object). single object should be there
Not sure if you wanted the selected nodes (parts) of the model selected or visible/loaded only when the page is opened so I'd cover both options here...
You can either select the components/nodes by their dbids soon as the model's loaded (when the model tree is available so nodes can be associated with their dbids):
const selection = viewer.getSelection()
//persist or pass the dbid array as parameter for the new page
//...
NOP_VIEWER.addEventListener(Autodesk.Viewing.OBJECT_TREE_CREATED_EVENT, e=>{
viewer.select(selection) // or viewer.isolate(selection) depending on your needs
})
Or load the selected components only following here ...

Bryan Huang
- 5,247
- 2
- 15
- 20