Autodesk forge 中有没有办法通过属性面板中显示的 id 获取实体名称?
我正在尝试获取 dbId 的完整名称。我可以使用 getNodeName() 获取名称,但也有办法获取 id 吗?我在下图中突出显示了我需要的 id。
属性面板快照:
I am trying to get the entire name of a dbId. I am able to get the name using getNodeName() but is there a way to fetch the id as well? I have highlighted the id I need in the image below.
Property panel snapshot:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您在查看器中看到的所有内容都是开源的,并且可以通过 JavaScript 获得,包括您在屏幕快照中显示的属性面板,因此肯定可以访问突出显示的 Revit 元素 ID。在最坏的情况下,您只需抓取属性面板窗口的标题并从中解析它。但是,也可以从查看器节点属性访问 Revit 图元 ID。它可以从
externalId
属性中提取,其中包含它的十六进制编码。有关更多详细信息,请参阅之前关于实例元素中缺少 Revit ID。Since everything you see in the viewer is open source and available through JavaScript, including the property panel that you show in the screen snapshot, the highlighted Revit element id can definitely be accessed. In the worst case, you would simply grab the caption of the property panel window and parse it from that. However, the Revit element id is also accessible from the viewer node properties. It can be extracted from the
externalId
property, which includes a hex encoding of it. For more details, please refer to the similar previous question on missing Revit ID in instance elements.