Avoid duplication of element Id

Avoid duplication of element Id

Anonymous
Not applicable
1,379 Views
4 Replies
Message 1 of 5

Avoid duplication of element Id

Anonymous
Not applicable

Is there any possibility of duplication between project file's modeling element ID and ongoing project file's modeling element ID when I link Revit project file?

 

If there is any possibility of duplication would you let me know what should I do to avoid duplication?

0 Likes
Accepted solutions (1)
1,380 Views
4 Replies
Replies (4)
Message 2 of 5

arnostlobel
Alumni
Alumni
Definitely! A master model and its linked models have totally separated domains of their elements' Ids. That means that one is very likely to find elements in all linked documents that would have the same Id as another entirely different element in the master model.

What issue do you have with the duplicates, BIMS_Keris?

Arnošt Löbel
Autodesk, Revit R&D
Arnošt Löbel
0 Likes
Message 3 of 5

Anonymous
Not applicable
When the BIM project's scale or file size is large, Architecture, Mechanical, Electrical be written in a different file.



I'm going to store elements of each project file to external database.



I want to insert all project element(architecture, mechanical, electrical) into a database table named "TB_ELEMENT" without element id("TB_ELEMENT" table's Primary Key) not duplicated.
0 Likes
Message 4 of 5

arnostlobel
Alumni
Alumni
Accepted solution

Hello BIMS_Keris:

 

You cannot use bare element Ids in the scenario you described. There will definitelly be dublicated Ids across the sperarate documents. Also consider that if the documents are workshared their elements may change Ids too. You may prefer using UniqueIds instead. Those are strings and likely to be unique even across linked documents as long as the dosuments weren't created by copying each other. (By copying I mean physically copying the files on disk.) Ideally, your database table should have entry for each element consisting of the element's UniqueId plus the Id of the instance of the containing linked document (null for the master document.) That way you'll achieve true uniqueness.

 

Arnošt Löbel

Sr. Principal Engineer, Revit 

Arnošt Löbel
0 Likes
Message 5 of 5

Anonymous
Not applicable
Thank you!
0 Likes