You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Openings, property sets, relationships and type objects take their GlobalIds from the document GUID, so they move between two saves whose document GUIDs differ (#1840) #1854
The seed is the Unique Document GUID (BasicFileInfo), and HWT-25's two saves of one Revit 2027 model have different ones (#1829). So between those saves every such GlobalId moves while the elements' own hold. #1850 fixes this for an element's further pieces only. A tool that tracks openings or property sets across versions (BCF viewpoints on an opening, a property diff keyed by set GlobalId) still sees every one removed and added again.
What Revit's export does instead. Revit derives a sub-entity's GUID from its element's (revit-ifc GUIDUtil.CreateSubElementGUID, and the relationship GUIDs from the GUIDs they relate), so its export does not depend on the document's GUID. rvt-rs could seed each of these from the GlobalId of the element it belongs to: an opening from its host and its filling, a property set from its element and its name, a relationship from what it relates.
It is every save, not only HWT-25's. The Unique Document GUID differs on every yearly save of every Autodesk sample project Measure reads. From the rvt-info outputs of run 43301498228:
rac_basic, rac_advanced and rst_basic of 2015 to 2027: 13 saves each, 13 different GUIDs each;
rme_basic and rme_advanced: 6 saves each, 6 GUIDs each.
So between any two saves of one project, every GlobalId rvt-rs derives from that GUID moves: openings, property sets, relationships, type objects without a Revit GlobalId, and (until #1850) an element's further pieces. The elements' own GlobalIds, rebuilt from their UniqueIds, hold.
What Revit seeds instead (revit-ifc GUIDUtil.cs):
project-level GUIDs (CreateProjectLevelGUID) come from the ProjectInformation element: a stored IfcProject GUID-style parameter where present, otherwise a GUID string made from the element;
sub-element GUIDs (CreateSubElementGUID) come from their element and an index.
So nothing in Revit's export follows the document GUID.
The fix belongs at the seed, not at each of the writer's 56 gid calls.stable_guid(document, key) is the one place the document GUID enters, in element_global_ids and in emit_data's gid. Replacing document with a project-stable seed makes every derived GlobalId hold across saves, #1840's pieces included. There are two candidates, each with a cost:
The ProjectInformation element's Revit GlobalId (revit_global_ids already maps every ElementId), as Revit does. It needs that element's ElementId, which costs a read unless the export already has it.
The GUID of the document's first editing episode (EpisodeHistory), which every later save keeps. It needs no read, but a project started from a template may begin with the template's episodes.
With either seed, a "Save As" copy keeps the same derived GlobalIds, as Revit's own export does for its elements. Which seed to take is decided by measuring it, not by assumption: on the sample saves, the GlobalIds should hold between consecutive saves and still differ between different projects. #1850 is reworked onto the seed if the measurement holds, since that covers its pieces too.
No project-level seed both holds across saves and differs between projects. A sub-entity's GlobalId has to come from its owner element's.
probe_1854_project_seeds (branch research/1854-project-seeds, dff361e1) prints the four candidates, each as the first 12 hex digits of its SHA-256. Run 43327315618 covered 102 models: the samples of every year, BIM4LCA, R2025 and the reference models.
Candidate
Across one project's saves
Across projects
Unique Document GUID (today's seed)
differs on every save: 13 of 13 for rac_advanced, rac_basic and rst_basic 2015 to 2027
unique on all 102
First episode GUID
holds, except rst_basic: 2 values in 13 saves
8 values on 102 models
ProjectInfo's Revit GlobalId
holds, the same as the first episode
the same 8 values
ProjectIdentitym_guid / m_modelIdentity
read on none of the 102
The first episode, and the ProjectInfo GlobalId derived from it, are the template's, not the project's:
One value is shared by 64 models: every Autodesk rac, rme and rst sample of every year, all 12 BIM4LCA models and RE1 Architecture.
All 24 R2025 models share another.
So do the four Snowdon Towers discipline models, and the three RE1 MEP models.
Seeding from it would give two different projects from one template the same GlobalId for every derived entity whose key matches. Ports keyed by ElementId would collide, since two projects number their elements from the same point.
Design (the issue's own proposal, now with a measured reason). Each GlobalId the writer derives is seeded from the Revit GlobalId of the element it belongs to, and the document GUID is no longer mixed in:
an opening from its host's and its filling's;
an element's property sets, quantities and material association from the element's;
a relationship from what it relates;
a port from its element's;
a type's property sets from the type's.
An owner's Revit GlobalId already differs between documents, except on elements the projects took from their template, where Revit's own export gives the same GlobalId too. #1850 did this for further pieces.
What has no owner GlobalId keeps the document seed and still moves between saves, and the changelog will say so. That is the project, site and building when Revit gives them none, and a type object without a Revit GlobalId.
Rows go here before the PR's run: every GlobalId whose owner keeps its GlobalId holds between two saves, by #1852's element diff on the sample pairs, and every GlobalId stays unique within each export.
Release plan: this ships in the same release as #1850.#1850 moves every further piece's GlobalId once. Its changelog entry carries an upgrade note for clash and BCF users. This issue moves the GlobalIds of openings, property sets, quantities, material associations and relationships once more. If they reach users in two releases, a tool that follows elements by GlobalId sees two rounds of "removed and added".
So the next release (0.20.0) is not tagged until this lands, or until it is decided, with a reason stated here, to ship #1850 alone. The release's notes then say once, in one place, what moves and that it is the last time for each kind of entity.
Release plan, revised: 0.20.0 ships now without either GlobalId move. #1850 and #1859 ship together in 0.21.0.
The plan above (comment 6839580056) held 0.20.0 for this issue so that the two GlobalId moves reach users once. That also held back what main gained since 0.19.0, which moves no GlobalId:
the crafted-file fixes: e0f6289b, an id that cannot end the header comment and stored numbers past any model read as absent; 7693fc29, de13257a and 080238ca, checked arithmetic and step budgets; b91838b6, 32-bit overflows; ebab7376, loops instead of recursion;
19 other fixes and features.
Neither move is on main: #1850 is unmerged, and this issue's fix is #1859, still a draft under measurement. So 0.20.0 is cut from main as it stands, and #1850 is a draft again so it cannot land before the tag.
Once 0.20.0 is tagged, #1850 and #1859 land, and 0.21.0 carries both moves with the one upgrade note, as planned. A tool that follows elements by GlobalId still sees one round.
Activity
DrunkOnJava commentedon Nov 12, 2026
It is every save, not only HWT-25's. The
Unique Document GUIDdiffers on every yearly save of every Autodesk sample project Measure reads. From thervt-infooutputs of run 43301498228:rac_basic,rac_advancedandrst_basicof 2015 to 2027: 13 saves each, 13 different GUIDs each;rme_basicandrme_advanced: 6 saves each, 6 GUIDs each.So between any two saves of one project, every GlobalId rvt-rs derives from that GUID moves: openings, property sets, relationships, type objects without a Revit GlobalId, and (until #1850) an element's further pieces. The elements' own GlobalIds, rebuilt from their UniqueIds, hold.
What Revit seeds instead (revit-ifc
GUIDUtil.cs):CreateProjectLevelGUID) come from theProjectInformationelement: a storedIfcProject GUID-style parameter where present, otherwise a GUID string made from the element;CreateSubElementGUID) come from their element and an index.So nothing in Revit's export follows the document GUID.
The fix belongs at the seed, not at each of the writer's 56
gidcalls.stable_guid(document, key)is the one place the document GUID enters, inelement_global_idsand inemit_data'sgid. Replacingdocumentwith a project-stable seed makes every derived GlobalId hold across saves, #1840's pieces included. There are two candidates, each with a cost:ProjectInformationelement's Revit GlobalId (revit_global_idsalready maps every ElementId), as Revit does. It needs that element's ElementId, which costs a read unless the export already has it.EpisodeHistory), which every later save keeps. It needs no read, but a project started from a template may begin with the template's episodes.With either seed, a "Save As" copy keeps the same derived GlobalIds, as Revit's own export does for its elements. Which seed to take is decided by measuring it, not by assumption: on the sample saves, the GlobalIds should hold between consecutive saves and still differ between different projects. #1850 is reworked onto the seed if the measurement holds, since that covers its pieces too.
DrunkOnJava commentedon Nov 12, 2026
No project-level seed both holds across saves and differs between projects. A sub-entity's GlobalId has to come from its owner element's.
probe_1854_project_seeds(branchresearch/1854-project-seeds,dff361e1) prints the four candidates, each as the first 12 hex digits of its SHA-256. Run 43327315618 covered 102 models: the samples of every year, BIM4LCA, R2025 and the reference models.Unique Document GUID(today's seed)rac_advanced,rac_basicandrst_basic2015 to 2027rst_basic: 2 values in 13 savesProjectIdentitym_guid/m_modelIdentityThe first episode, and the ProjectInfo GlobalId derived from it, are the template's, not the project's:
rac,rmeandrstsample of every year, all 12 BIM4LCA models and RE1 Architecture.Seeding from it would give two different projects from one template the same GlobalId for every derived entity whose key matches. Ports keyed by ElementId would collide, since two projects number their elements from the same point.
Design (the issue's own proposal, now with a measured reason). Each GlobalId the writer derives is seeded from the Revit GlobalId of the element it belongs to, and the document GUID is no longer mixed in:
An owner's Revit GlobalId already differs between documents, except on elements the projects took from their template, where Revit's own export gives the same GlobalId too. #1850 did this for further pieces.
What has no owner GlobalId keeps the document seed and still moves between saves, and the changelog will say so. That is the project, site and building when Revit gives them none, and a type object without a Revit GlobalId.
Rows go here before the PR's run: every GlobalId whose owner keeps its GlobalId holds between two saves, by #1852's element diff on the sample pairs, and every GlobalId stays unique within each export.
DrunkOnJava commentedon Nov 13, 2026
Release plan: this ships in the same release as #1850. #1850 moves every further piece's GlobalId once. Its changelog entry carries an upgrade note for clash and BCF users. This issue moves the GlobalIds of openings, property sets, quantities, material associations and relationships once more. If they reach users in two releases, a tool that follows elements by GlobalId sees two rounds of "removed and added".
So the next release (0.20.0) is not tagged until this lands, or until it is decided, with a reason stated here, to ship #1850 alone. The release's notes then say once, in one place, what moves and that it is the last time for each kind of entity.
DrunkOnJava commentedon Nov 13, 2026
Release plan, revised: 0.20.0 ships now without either GlobalId move. #1850 and #1859 ship together in 0.21.0.
The plan above (comment 6839580056) held 0.20.0 for this issue so that the two GlobalId moves reach users once. That also held back what
maingained since 0.19.0, which moves no GlobalId:e0f6289b, an id that cannot end the header comment and stored numbers past any model read as absent;7693fc29,de13257aand080238ca, checked arithmetic and step budgets;b91838b6, 32-bit overflows;ebab7376, loops instead of recursion;Neither move is on
main: #1850 is unmerged, and this issue's fix is #1859, still a draft under measurement. So 0.20.0 is cut frommainas it stands, and #1850 is a draft again so it cannot land before the tag.Once 0.20.0 is tagged, #1850 and #1859 land, and 0.21.0 carries both moves with the one upgrade note, as planned. A tool that follows elements by GlobalId still sees one round.
fix(research): the GlobalId census counts only classes whose first at…
ci: the held-out scrub keeps the GlobalId census's counts, which hold…
chore(release): prepare v0.20.0 (#1869)
merge: the branch of #1850 (a072764: main at 9f43fe3 and #1840) into …
fix(ifc): an element's further pieces take their GlobalIds from the e…
merge: main at b51bf33 (#1850 landed) into the branch of #1854, the s…
chore(release): prepare v0.21.0 (#1888)
fix(ifc): openings, property sets, quantities and relationships take …