Warm tip: This article is reproduced from serverfault.com, please click

其他-Autodesk Forge:我创建了一个应用程序来转换CAD文件,但看不到装配体的属性

(其他 - Autodesk Forge: I created an app to translate CAD files, but cannot see properties for an assembly)

发布于 2020-11-30 20:39:12

因此,我创建了一个nodejs应用程序来转换CAD文件并在查看器中显示它们。对于.rvt文件和单个Inventor组件,我可以通过转到模型浏览器并单击每个组件来查看属性,但是,看不到整个Inventor装配体的属性。如何查看装配体属性?

我正在使用此示例:https : //github.com/Autodesk-Forge/viewer-walkthrough-online.viewer

我所做的唯一更改是将compressionUrn设置为true,并添加了rootFileName以允许翻译Inventor程序集。

Questioner
thewire
Viewed
0
Adam Nagy 2020-12-02 03:30:31

有一个名为modelBrowserExcludeRoot的选项,你可以在创建Viewer时将其设置为false在这种情况下,模型根对象将在“模型”浏览器中可见,并且在选择它时,你将在“特性”选项板中看到装配的特性,例如

Autodesk.Viewing.Initializer(options, () => {
  viewer = new Autodesk.Viewing.GuiViewer3D(
    document.getElementById('forgeViewer'), 
    { 
      modelBrowserExcludeRoot: false 
    }
  );
  viewer.start();
  var documentId = 'bubble.json'; 
  Autodesk.Viewing.Document.load(documentId, onDocumentLoadSuccess, onDocumentLoadFailure);
});

刚才也写了一篇关于它的博客文章: 根对象在模型浏览器中不可见