-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactoring of the RevitIdentifiers fragment #884
Refactoring of the RevitIdentifiers fragment #884
Comments
Self-confirming the renaming order mentioned above, based on the links and https://forums.autodesk.com/t5/revit-api-forum/unique-id-changing/td-p/5239453 |
Thanks @pawelbaran . I had a read of the link you posted, and there was another useful resource (a blog post from Jeremy Tammik) pointed out. From http://thebuildingcoder.typepad.com/blog/2009/02/uniqueid-dwf-and-ifc-guid.html:
This means that in effect, in Revit, the UniqueId is a combination of a GUID (which should be the "Unique part") and a ElementID (non-unique part): However, since:
... somehow Revit manages to create two identical GUIDs "when you create multiple items in a row"!! Therefore, Revit must ensure that "when two items are created in a row", their ElementId differs. They are leaving developers and users no other choice other than believing this is always guaranteed. It goes without saying that this is not wise for them, considering that they could have avoided this responsibility by not copying the GUID around. Anyway. The final conclusion is: Well, so it works. |
I think that in general you are correct @alelom. Just a bit more explanation of the
Which means that the first part is episode(project?)-specific GUID, while the second is the identifier of an element within this episode. On top of that, in case of identical Ids created by two users locally, the conflict gets resolved on synchronization. |
Following the chat with @alelom, this is going to be resolved in 4.1 as not super urgent to happen in this Milestone. |
Hey @pawelbaran , this issue is getting again some relevance as @kayleighhoude is starting some heavy use of Diffing for MEP workflows and data pulled from Revit. You think we could start working on it? |
Happy to start again a discussion on this. For example, in this issue description we write:
but we are actually using We need to write down a good reference wiki page on the choice of the Id for the Diffing and why we chose it. Due to my limited knowledge of Revit things are still confusing for me. @kayleighhoude maybe we could have a session with @pawelbaran and write down a stub for it. Have a look at what I wrote back then. |
Sure I am up for getting this sorted. Just to sum up all the discussions we had on different occasions:
So we have two separate actions to be taken on the
I believe the best we can do for now is to tackle the first and then think what to do about the second (I am a bit concerned about renaming ElementId to Id - the former is clear to the users, the other not really). How does that sound @kayleighhoude @alelom? |
I would add that if we're renaming any properties using |
I'm going to veto renaming ElementId, Id. All Revit users are very aware of the "Element ID" property within their Revit models. Having two non-familiar ID names is confusing. |
Thanks @kayleighhoude , this is exactly one of the first points we considered, because Revit is something of a special case amongst software, in that it has many IDs that have a precise name and meaning. I think it's valuable to have you in this conversation to find the solution we think is best. I can think of alternatives to the "renaming" solution proposed above. Each solutions comes with a tradeoff. Solution 1:
|
So after a chat with @pawelbaran @al-fisher and me we decided to implement Solution 1 for now, but only partially - limited to the renaming of Now this means that we end up in a "hybrid" situation where the same fragment is used for BHoM concepts and Revit concepts. Therefore, on the long term, we still need to evaluate and implement Solution 2 or 3. |
Description
Linked to BHoM/BHoM_Adapter#256:
ElementId
andUniqueId
to be renamed toId
andPersistentId
, respectively.Note (edited by @alelom):
The RevitIdentifier fragment will then be able to implement the
IPersistentAdapterId
interface.Once the interface is implemented, the Diffing will work automatically for Revit objects imported through the Pull.
References regarding Revit Id naming conventions and usage
https://wrw.is/the-many-ids-of-a-revit-element-and-how-to-work-with-them-elementid-uniqueid-dwf-guid-ifcguid/
https://thebuildingcoder.typepad.com/blog/2009/02/uniqueid-dwf-and-ifc-guid.html
https://thebuildingcoder.typepad.com/blog/2014/04/element-id-export-unique-navisworks-and-other-ids.html
https://thebuildingcoder.typepad.com/blog/2015/02/understanding-the-use-of-the-uniqueid.html
@alelom @al-fisher FYI
The text was updated successfully, but these errors were encountered: