Search code examples
autodesk-forgeautodesk-viewer

How to completely hide objects in 2D Dwg model


I am loading the Forge viewer a Dwg model hosted in BIM360Docs, which is a 2D view, and I am trying to hide all but a few specific objects, but I am not succeeding. I have tried with: viewer.HideAll viewer.impl.visibilityManager.setNodeOff setGhosting

Note: I know that some of these functions are not implemented in 2D.

The only thing I get is to put the elements that I don't want in ghost mode, but I can't hide them completely. In 3D models if that I have succeeded. Is there any option to completely hide the objects in 2D? One option I had thought of is to paint it white.


Solution

  • Currently there is no official way to completely hide a 2D element. You can toggle 2D elements off using viewer.impl.visibilityManager.setNodeOff(dbid, true), however keep in mind that any APIs under viewer.impl are considered internal, and could change in future releases of the viewer.