0

We are using Forge viewer version 3.2.x.

For Autodesk.Viewing.Document the function load(documentId,onSuccessCallback,onErrorCallback,accessControlProperties) the parameter accessControlProperties is listed as required (see Autodesk Forge Documentation). Not providing this parameter still works on Chrome / Firefox, but I discovered that missing the parameter causes problems on mobile devices. However, for this parameter there seems to be no example or specification available.

Maybe the problem is not the missing parameter itself but something else...? Getting the following exception in browser console:

Uncaught TypeError: Cannot read property 'id' of null
at PinchRecognizer.recognizeWith (viewer3D.js?v=3.2.*:2300)
at Array.forEach (<anonymous>)
at each (viewer3D.js?v=3.2.*:923)
at invokeArrayArg (viewer3D.js?v=3.2.*:903)
at PinchRecognizer.recognizeWith (viewer3D.js?v=3.2.*:2294)
at new Autodesk.Viewing.GestureHandler (viewer3D.js?v=3.2.*:16042)
at GuiViewer3D.Viewer3D.createControls (viewer3D.js?v=3.2.*:44685)
at GuiViewer3D.Viewer3D.initialize (viewer3D.js?v=3.2.*:44758)
at GuiViewer3D.initialize (viewer3D.js?v=3.2.*:50852)
at GuiViewer3D.Viewer3D.start (viewer3D.js?v=3.2.*:44555)

Using Viewer.loadDocument(documentId,onDocumentLoad,onLoadFailed,accessControlProperties) is not an option, because we must load multiple models into the viewer.

Eason Kang
  • 6,155
  • 1
  • 7
  • 24
Marion
  • 1
  • 2

2 Answers2

0

Apologies for the late response, we have a backlog in the queue due to the IFC issue this week.

According to my experience, the accessControlProperties is not a required parameter for using ViewingApplication.loadDocument(). Could you consider providing a reproducible case demonstrating this issue to forge.help@autodesk.com? I'm glad to help you check what happened.

A non-confidential reproducible case contains following items:

Eason Kang
  • 6,155
  • 1
  • 7
  • 24
0

Thanks for your reply, Eason - isolating the issue from our whole application was quite difficult, but made me finally find the problem myself:

We had a conflict with another JavaScript library that is included in our minified js file. The GestureRecognizer classes are named similar as in the camunda library which we are using for modelling bpmn processes. Solved it by excluding that library from the global js and include it only where it is needed, same as how we are dealing with forge library.

Marion
  • 1
  • 2