learn.forge.viewhubmodels icon indicating copy to clipboard operation
learn.forge.viewhubmodels copied to clipboard

viewerable from metadata should be doc.getRoot().findByGuid(viewableId).parent

Open xiaodongliang opened this issue 5 years ago • 1 comments
trafficstars

With guid of metadata, we can find viewerable data by doc.getRoot().findByGuid(viewableId), but the viewerable that can be used with loadDocumentNode is its parent.

so the line below should be fixed to

doc.getRoot().findByGuid(viewableId).parent

https://github.com/Autodesk-Forge/learn.forge.viewhubmodels/blob/master/js/ForgeViewer.js#L39-L42

xiaodongliang avatar Apr 10 '20 03:04 xiaodongliang

get parent can only solve the scenario for view in non- BIM 360 Plan folder. To compatible with Plan folder, need to prepare correct version urn and view guid on server side. This PR completes: https://github.com/Autodesk-Forge/learn.forge.viewhubmodels/pull/17

xiaodongliang avatar Apr 19 '20 03:04 xiaodongliang