Search code examples
reactjsspriteheatmapautodesk-forgeautodesk-viewer

Uncaught (in promise) TypeError: viewer.loadExtensionAsync is not a function


This is the Error I'm getting

checkout the code on this link https://codepen.io/vibhav-joshi/pen/KKejEvE?editors=0010

We are trying to get the heatmap on our revit model but we are unable to show the heatmap. Tried several ways like changing the extensions from getExtensions() to loadExtensions() still nothing is showing in the viewer.


Solution

  • There's no method called loadExtensionAsync in the viewer API. You can use the loadExtension method which is also asynchronous (so you can await it), or getExtension if the extension was already loaded before.

    Also, please note that we have recently updated our DataViz demo, https://aps-iot-extensions-demo.autodesk.io, and you can find its source code here: https://github.com/autodesk-platform-services/aps-iot-extensions-demo.