Repository navigation
feat(ifc): give Revit 2023 elements Revit's own GlobalIds (#421) (RE-108) - #481
Merged
Merged
Conversation
…108) A 28-byte Global/ElemTable record holds the element's creating episode at +0x0c, where 2024's 40-byte record has it at +0x18. Every element, room and storey rvt-rs exports from the two 2023 projects with a Revit export now carries the GlobalId Revit gives it: Exemplo_data 37, 9 and 2; modelo_bim 37 and 4.
DrunkOnJava
enabled auto-merge (squash)
September 28, 2026 11:42
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_837ee9d9-24a9-49f7-b72c-acadd182141e) |
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Revit 2023 elements take Revit's own GlobalIds (RE-108, #421). RE-48 rebuilds the GlobalId Revit's exporter gives an element: the GUID of the episode that created it, with the ElementId XORed into its last 32 bits. It read the episode number from a 40-byte
Global/ElemTablerecord (2024 and later, at+0x18).A 28-byte record (Revit 2023) holds it at
+0x0c:u32 · u32 id · u32 second id · u32 episode · …. The first word isffffffff, the element's own id, or the element it is nested in.revit_global_idsnow reads both layouts.Results
tools/re/global_ids_vs_ifc.py)How the field was found:
Global/History, then its number in the element's record. It is at+0x0con every one.IfcRoofand fourIfcSlabparts sharing its Tag; rvt-rs's roof takes theIfcRoof's GlobalId.Changes
RECORD_EPISODE_OFFSET_28, and the layout picked by record length.Testing
Unit tests are banned in this repository; none were added.
cargo +1.85.0 check, fuzz workspace check (--locked), andtools/ci/verify-real-files.sh --profile ciwith both corpora.Legal and contribution hygiene
Breaking changes
None.
Note
Low Risk
Additive layout branch for 28-byte ElemTable records; 2024/2025 output is unchanged and wrong offsets would only yield empty or mismatched GlobalIds on 2023, not alter geometry or auth paths.
Overview
Revit 2023 IFC exports now use Revit's own GlobalIds for elements, rooms, and storeys, extending RE-48 instead of falling back to generated ids.
revit_global_idsused to bail out unlessGlobal/ElemTablerows were 40 bytes (2024+). It now also accepts 28-byte 2023 records and reads the creating-episode number at+0x0c(2024 keeps+0x18), then applies the sameGlobal/HistoryGUID + ElementId XOR rule.Docs and the support matrix note RE-108;
tools/re/global_ids_vs_ifc.pyscores rvt-rs vs Revit's IFC on the two measured 2023 projects. 2024/2025 exports stay byte-identical aside from timestamps.Reviewed by Cursor Bugbot for commit f0a8cff. Configure here.