0

I followed the tutorial to learn Autodesk Forge. I linked my BIM 360 account to the Forge Viewer. I would now like to add extensions to it and have a button on the toolbar that links to my extensions.

However when I follow the extension tutorial, nothing shows up. I also tried this one https://forge.autodesk.com/en/docs/viewer/v5/tutorials/toolbar-button/#before-you-begin and nothing appear.

I do not know what I am doing wrong since it seems to work if we follow the tutorial...

I am working on VS code

Right now, my code looks like this in the index.html file : enter image description here

The rest is exactly like the tutorial except that I replaced "MyAwesomeExtension" with "PieChartExtension"

Roman Pokrovskij
  • 9,449
  • 21
  • 87
  • 142
Elvi Na
  • 1
  • 1

1 Answers1

0

One thing to try will be to switch your var config3d to the following:

var config3d = {extensions: ['PieChartExtension']}

The reason might be, your syntax might be affecting and that is why the Viewer does not understand what to load. Did you check the console for any messaging?

Jaime Rosales
  • 1,106
  • 1
  • 6
  • 8
  • My output console gives me this git rev-parse --show-toplevel fatal: not a git repository (or any of the parent directories): .git I made the change but it does not change anything, I still don't have another toolbar button... – Elvi Na Oct 26 '18 at 18:01
  • another thing I see is your extension is specified to be in "/js/" and all your other js files are in "js/" that forward slash might be causing the project confusion and not being able to find it. The git error seems related to not being part of your git repo. https://stackoverflow.com/questions/20413459/fatal-not-a-git-repository-or-any-of-the-parent-directories-git – Jaime Rosales Oct 29 '18 at 13:58
  • Still nothing... I checked the entire code again and compared it to the tutorial. I really do not know where the problem is ... – Elvi Na Oct 29 '18 at 15:19
  • I got it ! I did the tutorial again from the start and it works this time. Thank you for you help ! – Elvi Na Oct 29 '18 at 15:36