Autodesk ObjectId and ElementId in dwg

2019-08-23 05:31发布

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.

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

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.

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

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.

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.

1条回答
Deceive 欺骗
2楼-- · 2019-08-23 06:26

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.

Oh, now I just found a better, more complete and succinct explanation of Unique IDs for Forge Viewer Elements:

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

  • 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.
查看更多
登录 后发表回答