0

How can I add custom extension into autodesk forge configurator inventor. For example I want to add transform or model transformer extension.

hamdi
  • 67
  • 2
  • 10

1 Answers1

0

Those are Viewer extensions, so you will have to load them into the Viewer.

In that sample the web part using the Viewer seems to be here: https://github.com/Autodesk-Forge/forge-configurator-inventor/blob/master/WebApplication/ClientApp/src/components/forgeView.js

So this is where you would have to add a reference to the given JavaScript library file and load the extension from it using viewer.loadExtension()

More info on extensions here: https://forge.autodesk.com/en/docs/viewer/v7/developers_guide/viewer_basics/extensions/

Adam Nagy
  • 1,700
  • 1
  • 9
  • 14
  • I know the viewer is working there yes. I write the load function into it and run it, and for example I am trying to add the import necessary for transform and register it. But I get an error because it doesn't see Autodesk and Three, however autodesk is defined in forgeView.js. Errors like this " 'AutodeskNamespace' is not defined , 'THREE' is not defined " – hamdi Mar 09 '21 at 13:56
  • I tried this solution but it didn't work https://stackoverflow.com/questions/55165163/cant-compile-react-app-with-forge-viewer-cant-compile-autodesk-not-defined – hamdi Mar 09 '21 at 13:57
  • This should help https://forge.autodesk.com/blog/add-viewer-extensions-design-automation-inventor-sample – Adam Nagy Mar 10 '21 at 20:01
  • Now I've seen it Adam.I will try it tomorrow at the earliest opportunity.Michal also shared your post, thank you. There is no place where you share the codes in full. is not it? I'm following you on github, but I guess it's not there :) – hamdi Mar 10 '21 at 20:39
  • OK. I added the full source code of transformtool.js to the blog post – Adam Nagy Mar 10 '21 at 21:01
  • Now I tried it and it worked. Thank you. Again, I will try to install the other extension with this logic.I'll look at the full code again – hamdi Mar 10 '21 at 21:05