问题
I have a function who require the instanceTree of my model who works in the desktop browser.
instanceTree = viewer.model.getData().instanceTree;
dbIds = getAllDbIds(instanceTree);
But in the mobile version of the viewer, the instanceTree from getData() seems to be missing for some reasons.
Do you know a way to access the instanceTree in the mobile viewer ? Or is it possible to specify an option in the viewer to allow the mobile version to have access to it ?
I'm in the version v6 of the viewer
I tried in the v7 but it's the same result.
Thanks
回答1:
When you're unable to access the object tree of a model on a mobile device, you're likely hitting memory limits of the Forge viewer, and you can try to bypass those by explicitly setting the memory.limit
config property to zero:
viewer = new Autodesk.Viewing.Private.GuiViewer3D(
document.getElementById('viewer'),
{ memory: { limit: 0 } }
);
来源:https://stackoverflow.com/questions/58236652/instancetree-unavailable-in-the-mobile-version-of-the-viewer