Repository navigation
Description
Description
On main, rvt-ifc exports almost nothing from Autodesk's Snowdon Towers 2024 samples, which v0.4.0 exports in full. It warns that every element record "use[s] a layout whose ElementId this release cannot locate" (RE-30). On the same files and machine:
| Input | v0.4.0 (release binary and source build of 39fdb2a) |
main @ 120e2f9 |
|---|---|---|
| Snowdon Towers Sample Structural.rvt | 1,282 elements, 12 storeys | 0 elements: 1,271 records skipped (RE-30) |
| Snowdon Towers Sample Architectural.rvt | 6,056 elements, 18 storeys | 1 element (one IfcMember): 6,082 records skipped (RE-30) |
| Snowdon Towers Sample Plumbing.rvt | 6,253 elements | 6,253 elements (unaffected) |
| 2024_Core_Interior.rvt (magnetar-io corpus) | 970 elements | 970 elements (unaffected) |
The magnetar-io corpus that CI measures is unaffected. Snowdon Architectural and Structural can't be committed, so I think this regression got past CI.
First bad commit (git bisect, test = Snowdon Structural exports ≥ 1,000 elements): 5131dc7 fix(elem_table): read the table's records from 0x06 (#152) (#559) (2026-10-03). Its parent 11d7523 is good.
From that commit on, the Global/ElemTable layout detection picks a different layout for Snowdon Structural, while Core Interior is still read correctly:
rvt-elem-table "Snowdon Towers Sample Structural.rvt"
11d7523 (good): layout: Explicit (40 B stride, 8-byte owner field at record +4, ...) first record offset: 0x1e
5131dc7 (bad): layout: Implicit (12 B stride, no owner field) first record offset: 0x30
rvt-elem-table 2024_Core_Interior.rvt
11d7523: layout: Explicit (40 B stride, 8-byte owner field at record +4, ...) first record offset: 0x1e
5131dc7: layout: Explicit (40 B stride, 8-byte owner field at record +28, ...) first record offset: 0x6
In both versions the record count matches the header (16,571 of 16,571). The new detector falls through to the implicit 12 B layout on Snowdon, so no element record finds its ElementId. #559's measure run reports the 6 reference models as byte-identical. Snowdon Architectural and Structural don't seem to be among the measured files, presumably because they can't be committed.
Cause and fix: detect_layout tests the rising order on the record's first id. On Snowdon, that id differs from the second (the ElementId, RE-41) on 27 (Structural) and 84 (Architectural) records, and it falls below its predecessor 2 and 3 times. The second id rises over every table I measured. A PR that tests the second id follows.
rvt-rs version
main @ 120e2f9 (2026-10-05); last good: v0.4.0 (39fdb2a)
Revit release the input file came from
2024 (build 20230405_1134_fb02163c5b4b)
Input file size (bytes)
28,057,600 (Structural); 94,691,328 (Architectural)
Command or API call
curl -fLO "https://revit.downloads.autodesk.com/download/2024RVT_RTM/Docs/InProd/Samples/Snowdon%20Towers%20Sample%20Structural.rvt"
cargo build --release --locked --bin rvt-ifc
./target/release/rvt-ifc "Snowdon Towers Sample Structural.rvt" -o out.ifc
Actual output
warning: the IFC is incomplete: 1271 model element record(s) use a layout whose ElementId this release cannot locate and were not exported (RE-30).
rvt-ifc: wrote 1820 bytes to out.ifc
rvt-ifc: readiness scaffold (score 0.35)
Expected output
The v0.4.0 result:
rvt-ifc: 1282 building element(s), 1282 with geometry, on 12 storey(s)
942 IfcBeam, 91 IfcBuildingElementProxy, 90 IfcFooting, 74 IfcColumn, 58 IfcWall, 27 IfcSlab
rvt-ifc: readiness geometry (score 1.00)
Environment
macOS 27.2 arm64, rustc 1.99.0 (Homebrew), cargo build --release --locked.
Activity
fix(elem_table): detect the record size by the ElementId, the second id
fix(elem_table): detect the record size by the ElementId, the second …
fix(ifc): a column that a joined slab or roof cuts is exported as its…
feat(ifc): Category, family/type and Phase Created in Revit's Other, …
chore(corpus): pin Autodesk's five Snowdon Towers 2024 models for Mea…
chore(corpus): pin Autodesk's five Snowdon Towers 2024 models for Mea…
DrunkOnJava commentedon Oct 18, 2026
This shipped in v0.5.0, with your fix from #737: Snowdon Towers Structural exports 1,282 elements again and Architectural 6,056. The five Snowdon Towers 2024 models are now part of Measure's sample set (#779), so a regression like this one shows in CI. v0.5.1 is the latest release (
pip install -U rvt,cargo install rvt --locked).ci(corpus): the tier-two job reads the BIM4LCA models CI's targets ne…