Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ElementId in Schema - Auto updated?

1 REPLY 1
SOLVED
Reply
Message 1 of 2
drdanielfc
310 Views, 1 Reply

ElementId in Schema - Auto updated?

 Hello,

 

I am currently storing an ElementID in a schema inside another element. I would like to know if this is a stable way of storing the reference to the other element in a worksharing environment.

 

I did some research and came across this article, but I am unsure about one part of the accepted answer:

 

"Since all elements must have unique Ids within a file, something's got to give; Revit takes the UB's wall and assigns it a new Id, say 1006 and uploads that wall to the central file."

 

When Revit assigns the wall a new Id, does it also automatically update the ElementId reference within the schema?

 

If not, I assume that would mean that the accepted way of storing such a reference would be using a UniqueId?

 

Thanks,

Daniel

1 REPLY 1
Message 2 of 2
arnostlobel
in reply to: drdanielfc

Hello Daniel,

 

The answer to your (first) question is a “Yes”. If you store an element’s ID in your external storage attached to an element, that stored data will be stable. It means that if there is a need for the referenced element’s id to be changed (e.g. during work-sharing synchronization), that stored element Id would be updated accordingly.

 

The article you pointed to is about something else: It talks about storing elements’ Ids outside of the model, e.g. in some external database or as variables within the external application’s run-time memory. Revit will not, naturally, updated those, therefore unique Ids must be used instead in those cases.

Arnošt Löbel

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community