Freeman Cheng
Freeman Cheng

Reputation: 19

How to get current document node in Autodesk Forge Viewer?

Is there any way to get the current name and guid of document node that is displayed by viewer from NOP_VIEWER?

Upvotes: 0

Views: 391

Answers (1)

michael beale
michael beale

Reputation: 1196

Yes, use doc = NOP_VIEWER.model.getDocumentNode()

where doc.guid and doc.name contains what you need

doc...

guid: "7c752bce-db6d-e2bc-5c47-b6a90cbe8cfa"
hasThumbnail: "true"
name: "New Construction"
phaseNames: "New Construction"
progress: "complete"
role: "3d"
size: 18529526
status: "success"
success: "100%"
type: "geometry"
viewableID: "c884ae1b-61e7-4f9d-0001-719e20b22d0b-000f3c60"

Upvotes: 2

Related Questions