Search code examples
autodesk-forgeautodesk-viewerautodesk-model-derivative

Forge Viewer - can we associate objects of model with markups which are drawn in viewer?


I have object tree view on left side of my viewer, now am looking to establish an association with the markups drawn on the viewer, for example if click on wall object, it should focus me that particular wall object along with the markups there and also should hide other markups in that viewer. So it's making easy for user to see all those associated markups in that wall only. Is this doable?

Thanks in advance


Solution

  • it should focus me that particular wall object along with the markups there and also should hide other markups in that viewer.

    Try control the visibility of a markup with:

    markupExt.markups[index].shape.style.display='none/block'
    

    And to add markups to the position of a particular node follow here: https://forge.autodesk.com/blog/placing-custom-markup-dbid