dwg中的Autodesk ObjectId和ElementId [英] Autodesk ObjectId and ElementId in dwg

查看:257
本文介绍了dwg中的Autodesk ObjectId和ElementId的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常使用Forge API开发一个Web应用程序.运行良好.同时在伪造中使用设计自动化.我可以创建Package,并且可以正常工作.

I am use to develop one web app using Forge API. It's working well and good. At the same time am using design automation in forge. I can able to create Package and it's working fine.

我将使用准备查看器的伪造api处理dwg文件.我可以在浏览器中查看dwg.

I will process the dwg file using forge api preparing to viewer. I can able to view dwg in browser.

我的问题是我有查看器单击事件,该事件单击会填充元素ID.但是,我的包裹我只能得到对象ID.元素ID和对象ID完全不同.

My issue is I have viewer click event the event click populate the element id. However, my package I can get only the object id. element id and object id totally different.

每个对象客户端和服务器端的conman id是什么.

What is the conman id each object client and server side.

摘要:当用户单击查看器中的对象时,我要捕获id并存储我的本地数据库.使用包,我需要处理用户单击的对象.

Summary: when user click the object in viewer I want to capture id and store my local database. and using package I need to process the user clicked object.

示例:当用户在查看器中单击图形编号时.从下一次开始,我想使用C#代码中的调用程序包动态更改图形编号.

Example: when user click the drawing number in viewer. From the next time I want change the drawing number dynamically using call package from C# code.

推荐答案

对于RVT文件,一种简单的处理方法是从Forge对象属性中提取Forge externalId.这等于Revit元素UniqueId属性. RvtMetaProp Revit添加-in 利用了这一点.

For an RVT file, one easy way to handle this is to extract the Forge externalId from the Forge object properties. That is equal to the Revit element UniqueId property. The RvtMetaProp Revit add-in makes use of this.

哦,现在我发现了对在处理Revit文件时,查看器可以访问三种类型的ID:

The Viewer gives access to three types of IDs when dealing with Revit files:

  • dbId:这是特定于查看器的,用于操纵查看器中的元素,例如.getProperties()方法.
  • Revit ElementID:在查看器中作为Name属性的一部分公开.选择某些内容时,属性"面板标题的形式为名称[12345]".您可以解析此名称字符串并提取元素ID.
  • Revit UniqueID:在.getProperty()响应中显示为externalId属性.
  • dbId: this is viewer specific and used to manipulate elements within the viewer, such as for the .getProperties() method.
  • Revit ElementID: exposed as part of the Name property in the viewer. When you select something, the Property panel title is in the form of 'Name [12345]'. You can parse this name string and extract the element id.
  • Revit UniqueID: exposed as the externalId property in the .getProperty() response.

这篇关于dwg中的Autodesk ObjectId和ElementId的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆