The Autodesk forge viewer, from the learning samples, does not seem to have a 3d viewing option when opening a .dwg file. Is there a way to view a .dwg file in 3d rather than just a plan view? A shading option would be useful as well as many .dwg files contain solids.
Asked
Active
Viewed 273 times
1 Answers
0
You can take advantage of Autodesk.DocumentBrowser extension to switch between views if you can see 3d views listed in the model derivative manifest of the DWG file.
viewer.loadExenstion('Autodesk.DocumentBrowser');
Here is an example of the look of the Autodesk.DocumentBrowser
ext for a Revit file. You may see a similar tree structure while using it with DWG files.
Or you can modify your viewable filter to obtain 3D viewables only instead like this way:
var viewables = viewerDocument.getRoot().search({type:'geometry', role: '3d'});
viewer.loadDocumentNode(viewerDocument, viewables[0]);

Eason Kang
- 6,155
- 1
- 7
- 24