I've tried to change the object color in Autodesk Forge Viewer using the following link.
https://adndevblog.typepad.com/cloud_and_mobile/2015/12/change-color-of-elements-with-view-and-data-api.html
But, I've got the below issue when trying to load the extension "Autodesk.ADN.Viewing.Extension.Color".
"Uncaught (in promise) Extension failed to .load() : Autodesk.ADN.Viewing.Extension.Color at ExtensionManager.js:390"
That's an old article. Now the load() function of the extension needs to return true on a successful load - as shown here: https://forge.autodesk.com/en/docs/viewer/v7/developers_guide/viewer_basics/extensions/
So just return true at this place in the code:
_self.unload = function() { console.log('Autodesk.ADN.Viewing.Extension.Color unloaded'); return true; }; return true; // <<-- add this here };
2.1m questions
2.1m answers
60 comments
57.0k users