简体   繁体   English

Forge Viewer中的个人工具栏按钮未出现

[英]Personal toolbar button in Forge Viewer not appearing

I followed the tutorial to learn Autodesk Forge. 我按照教程学习了Autodesk Forge。 I linked my BIM 360 account to the Forge Viewer. 我已将BIM 360帐户链接到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. 我还尝试了一个https://forge.autodesk.com/zh-CN/docs/viewer/v5/tutorials/toolbar-button/#before-you-begin ,但没有任何显示。

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 我正在研究VS代码

Right now, my code looks like this in the index.html file : enter image description here 现在,我的代码在index.html文件中如下所示: 在此处输入图片描述

The rest is exactly like the tutorial except that I replaced "MyAwesomeExtension" with "PieChartExtension" 其余部分与本教程完全一样,只是我将“ MyAwesomeExtension”替换为“ PieChartExtension”

One thing to try will be to switch your var config3d to the following: 可以尝试的一件事是将var config3d切换为以下内容:

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. 原因可能是,您的语法可能会受到影响,这就是为什么Viewer无法理解要加载的内容。 Did you check the console for any messaging? 您是否在控制台中检查了任何消息传递?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM