0

We are trying to create a system that can displays BIM Model using Model Derivative and Viewer API, and provide functionality to use updated BIM Model, while preserving the mapping between element (currently we are using dbId) with some metadata.

The problem is that when we post Model Derivative translation process with updated BIM Model(updated meaning that we modified Revit file using Autodesk Revit or equivalent toolkit), the original dbId is lost.

While looking through viewer API, we've found that through model.getProperty with dbId, we can obtain a value called 'external-id', which seem to be preserved even after the update. However, this seems like that this can only be accessed in client side; there is no MD api that provides external-id property(correct me if I am wrong please).

As the last resort, we are trying to map dbId=>metadata mapping from original BIM model to dbId=>metadata mapping in updated BIM Model by creating a dbId=>dbId mapping using name as common feature, but we are worried that adding / removing BIM Model's element while updating would cause name mapping to be invalid.

TL DR; the question is: Is there a way to obtain unique and preserving id per each ObjectId / dbId in Model Derivative translation process with updated BIMs?

MazaYong
  • 197
  • 1
  • 8

1 Answers1

0

Yes, exactly.

In Revit, the UniqueId is the safest method to persistently identify elements.

This UniqueId is available in the viewer, and unfortunately currently not in the model derivative API.

For an immediate solution, I suggest that you create you own shared parameter in Revit for all elements that are of interest to you and populate it with the UniqueId value. Then, that information will become available to you in the model derivative API as well.

Jeremy Tammik
  • 7,333
  • 2
  • 12
  • 17
  • Is this still the case? We are in a similar problem in 2020. We have a Revit model and when we move things around and re-upload the file we lose all the DBID's. I understand deleting and creating a whole new asset in Revit would equate to a brand new unique ID, but I would like an ID that exists over that assets lifetime that can be accessed in Forge! Thanks – aspirant_sensei Apr 02 '20 at 16:34
  • No, I do not believe this is currently the case and possibly it never was. Afaik, the Revit `UniqueId` is available in all Forge-generated contexts. – Jeremy Tammik Apr 03 '20 at 17:49