问题
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:
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 theName
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 theexternalId
property in the.getProperty()
response.
来源:https://stackoverflow.com/questions/48719257/autodesk-objectid-and-elementid-in-dwg