0

We have changed the Viewer option from {env: 'AutodeskProduction', API: 'derivativeV2' } to {env: 'AutodeskProduction2', API: 'streamingV2' } to load dbIds which will match with model derivative API ObjectId. It was working fine with the previous viewer options.

But with this new change, we are facing a bug that only one viewer is working at one time. Sometimes only the 3d viewer is working and getting Network problem messages in the 2d viewer. And sometimes 2d viewer is loading and gets an Access error in the 3d Viewer.

I have checked every combination, only it is failing in StremingV2 and AutodeskProduction2.

I have tested initializing both viewers separately and also loading both viewers with one Initialization. But it didn't solve the problem.

1 Answers1

0

I have a feeling you may still be using loadModel() - can you please switch to loadDocumentNode()?
https://aps.autodesk.com/blog/403-error-when-trying-view-svf2

Are you always displaying a 2D and a 3D view next to each other or it could be both 3D models, sometimes even the same model? Because then it could also be worth giving MultiViewerFactory object a try.
https://aps.autodesk.com/blog/sharing-resources-among-multiple-viewers

Adam Nagy
  • 1,700
  • 1
  • 9
  • 14
  • Yes, I was using loadDocumentNode() instead of loadModel(). Yes, We are displaying 2d and 3d views next to each other. We are showing models from the same URN, only the viewable is different one is 2d view and one is 3d. I have tried to MultiViewerFactory as well. Using this method I am getting the same error. If we load the 2D viewer first, then we get an access error on the 3D viewer. If we load the 3D viewer first then we get Network Issue on the 2D viewer. This only comes in streamingV2. In derivativeV2, it is working fine. – Pratik Singh Mar 10 '23 at 05:40
  • It seems to work here: https://codepen.io/adamenagy/pen/rNZpaYQ?editors=1001 If you check the logs of codepen you can see that they are indeed loaded as SVF2 (viewer.model.isSVF2()) – Adam Nagy Mar 10 '23 at 13:13