Alexandre Vieira
Alexandre Vieira

Reputation: 11

Autodesk Forge Viewer - PDF e DWF

We are using Viewer Autodesk via Forge to view dwf and pdf. As per your guidance: https://aps.autodesk.com/blog/dwf-and-pdf-support-forge-viewer.

Upvotes: 1

Views: 187

Answers (1)

AlexAR
AlexAR

Reputation: 1324

You can use Autodesk.DocumentBrowser extension which list all viewables of your document. You can access them by the hierarchy or by thumbnails. DocumentBrowserTree documentBrowserThumbnails

If you want to access different viewables by code you can get them with:

var viewables = viewerDocument.getRoot().search({'type':'geometry'});

instead of doing var defaultModel = viewerDocument.getRoot().getDefaultGeometry();.

This will give you the list all of the views or sheets you can display in the viewer.

Then if you want to filter only 3D or 2D, you can add a role filter in the search query: var twoDviewables = viewerDocument.getRoot().search({'type':'geometry', role: '2D'})

Upvotes: 2

Related Questions