Repository navigation
Description
rvt-rs writes no level parameters on exported elements. Revit's own IFC4 export carries them in the Constraints property set. Across 15 public Revit 2024 models (the eight Autodesk 2024 samples and Snowdon Towers), about 29,500 Level values are missing compared with Revit's export.
Every element has one record in the inflated Partitions/* streams (checksum pages stripped, every gzip member inflated) that opens d3 02 01 00 00 00, then u32 ElementId, u32 0, u32 LevelId, u32 0, then ff ff ff ff six times. LevelId (ElementId + 8) is the element's Level: a wall's Base Constraint, and for other categories the Level, Base Level, Reference Level or Schedule Level parameter.
A wall's Top Constraint is a second 0 | LevelId | 0 | ff.. group further into the record (seen 150 to 168 bytes after the start; the reader searches 100 to 320 bytes and takes the group only if its id is a recovered Level).
Measured against Revit's IFC4 export on seven public Revit 2024 samples (matched by Tag; equal / elements where Revit has the property): racadvanced Level 5214/5214, Base Constraint 180/180, Top Constraint 177/177; rmeadvanced Level 4151/4151, Reference Level 1216/1216; rstadvanced Level 502/502, Base Level 203/203. The other files agree in the same way (full table in the PR). On the record, shuffled-name controls were far lower (for example 3944 of 5421 on racadvanced against 5421).
Limits:
- The field is
0xfffffffffor beams, stairs, braces and some MEP terminals, whose level is stored elsewhere. Nothing is written for them. Top Constraintcoverage is partial: the offset of the group varies (150, 152, 156, 164, 168 seen) and walls whose group is not found get none. Where it is found it was exact (racadvanced 126/126, DACH 259/259, Snowdon 574/574, measured with a standalone scanner).- Revit 2024 only. The DACH and Snowdon Architectural samples export no elements on main (ElementId layout not located, RE-30), so nothing changes for them.
The change is additive: storey containment, LevelElementId and the level binding of RE-27, RE-59, RE-60 and RE-68 are untouched, and storey containment and element counts are identical to main on every file measured.
Clean-room: this finding comes from public Autodesk Revit 2024 sample files with Revit's own IFC4 export as the oracle and exported symbol names only; no SDK source and no decompiled or disassembled code was used.
Measured follow-ups (not in the PR)
The same record could also help storey placement, but not as a replacement for the current binding. On Snowdon Architectural (v0.4.0) rvt-rs agrees with Revit's storey on 513 elements where the record's Level differs, because Revit's export puts curtain-wall parts and openings on a storey other than their Level. Two narrow uses look safe. Both were measured against Revit's IFC4 storey containment, matched by Tag, on main 120e2f9:
- C, windows: main puts 47 windows on the wrong storey (racadvanced 18, Technical School 18, racbasic 11), and the record's Level is Revit's storey for all 47. No window or door that main places correctly would change. Doors gain nothing (racbasic has 3 doors that both get wrong).
- B, elements on no storey: main places some elements on no storey that Revit places, and the record's Level is right for them (rmeadvanced and rmebasic 3 each, racbasic 54). The larger case is DACH: on v0.4.0, 1,979 DACH elements were on no storey, and the record gave the right Level for 642. A further 639 need one more rule: a Level that is not a building storey maps to the storey below it, as Revit's export does. DACH exports no elements on main (RE-30 / Bug: main exports 0-1 elements from Snowdon Towers 2024 Structural/Architectural (ElemTable layout misdetected since 5131dc7, #559) #736), so B can only be measured there once fix(elem_table): detect the record size by the ElementId, the second id #737 lands.
These belong in separate PRs, if wanted.
Activity
feat(ifc): Level, Base/Top Constraint and Reference Level properties …
DrunkOnJava commentedon Oct 18, 2026
This shipped in v0.5.0 with your #751: the
Constraintsset carries Level, Base and Top Constraint and Reference Level. v0.5.1 is the latest release.