Autodesk API - 表数据

问题描述 投票:0回答:1

想知道是否有人可以向我们指出一些例子或更多(更好)的信息。

我们正在尝试 Autodesk 平台服务,并使其适用于我们的 .DWG 文件 => https://github.com/autodesk-platform-services/aps-simple-viewer-nodejs

我们试图弄清楚如何从 DWG 文件中的表格中提取数据。我们可以在查看器中看到表格,因此我们假设必须有一种很好的方法来获取行和列数据。

如果有人对此有任何建议,我们将不胜感激。

谢谢!

autodesk-forge autodesk-viewer autodesk
1个回答
0
投票

Table实体的内容存储在

strings
中,每个表实体都有一个关联的
stringDbIds
句柄值,
stringBoxes
带有几何信息。
{stringBoxes} = NOP_VIEWER.model.getData();

const {strings, stringDbIds} = NOP_VIEWER.model.getData();
const label = [];  
  strings.forEach((element, index) => {
    label.push([element]);
  }); 
  stringDbIds.forEach((element, index) => {
    label[index].push(element);
  });

//creating two dimensional array avoids skipping duplicates, renders the array as it is. :) 
console.log(label);

© www.soinside.com 2019 - 2024. All rights reserved.