Skip to content

Nordic LCA office as-built (Revit 2024, 14 streams, one 62 MB partition): walker finds levels and materials only #745

Closed

Description

@alexisskeates

Summary

Two of the twelve Revit 2024 projects in the public Nordic LCA set (Gravicon, Finland, 2024; building-permit and as-built stages of the same two buildings) decode into levels and materials only, while the other ten give full element sets. The two are ARK_NordicLCA_Office_Concrete_As-Built.rvt and ARK_NordicLCA_Office_Timber_As-Built.rvt. They differ from their siblings in the stream layout, not in the Revit build.

Measured with rvt 0.4.0 (rvt-info, rvt-elements --counts, rvt-ifc --diagnostics):

File Revit build Streams Partitions Walker elements
Office_Concrete_BuildingPermit (78 MB) 2024, 20230411_1515(x64) 98 Partitions/271 … (many, ~30–60 MB each raw) 13,156 typed (589 Wall, 268 Door, 265 Window, 31 Floor, 10 Roof, 234 Room, 345 StructuralColumn, 220 CurtainWall, 10,031 CurtainWallMullion, 165 Material, 3 Level …)
Office_Concrete_As-Built (65 MB) 2024, 20230411_1515(x64), save counter 427 14 Partitions/425, Partitions/426 106: 4 Level, 102 Material

The as-built file's stream list is BasicFileInfo, Contents, Formats/Latest, Global/ContentDocuments, Global/DocumentIncrementTable, Global/ElemTable, Global/History, Global/Latest, Global/PartitionTable, Partitions/425, Partitions/426, ProjectInformation, RevitPreview4.0, TransmissionData (no PartAtom). Partitions/425 is 62 MB on disk and inflates to about 378 MB over 3,635 truncated-gzip members. Same building, same Revit build, saved four hours after the building-permit file; Revit's own IFC4 export of it (in the same set) has the full model (walls, slabs, columns, doors, windows), so the elements are in there.

Diagnostics for the as-built export: warnings includes walker-max-record-decode-bytes: walker candidate decode stopped at max_per_record_decode_bytes and No building elements were exported; output is scaffold-only.; decoded.class_counts is {"HostObjAttr": 9} (low-confidence candidates suppressed), production_class_counts {"Level": 4, "Material": 102}. Raising the walker limits ten-fold (--max-walker-scan-bytes, --max-walker-candidates, --max-walker-trial-offsets, --max-walker-record-decode-bytes) did not change the count.

Guess

The file was saved through a different route (purge/compact/transmit/"save as" with compaction?) that packs the whole element database into one partition with a different internal framing, and the element-record scanner keyed to the 2024 marker (RE-80) does not find records in it. The building-permit sibling, with the same schema and build, is a ready A/B pair for diffing the partition chunk headers.

Data

The Nordic LCA models are published by Gravicon (2024) as open test data; I can send the file pair or any hex dumps you want from them, but did not attach them here.

Found while wiring rvt 0.4 into Storey (a Rust CAD/BIM app) as its direct .rvt importer; the other ten files import with the expected counts, thank you for the crate.

Activity

  1. helenkwok commented on Oct 13, 2026

    @helenkwok
    Contributor

    I looked at ARK_NordicLCA_Office_Concrete_As-Built.rvt from the same public set (BIM4LCA, CC BY-SA 4.0), and the elements are still in the file. Every element has a small association record that starts with the bytes d3 02 01 00 00 00, followed by u32 ElementId, u32 0 and u32 level ElementId (RE-172, PR #751). I scanned the page-stripped, fully inflated Partitions/* streams for that prefix and found a record for 13,307 of the 13,354 elements in Revit's own IFC export of the file, matched by Tag.

    The as-built file behaves exactly like its building-permit sibling:

    file records found / IFC elements level set level = Revit's storey shuffled-label control
    Office_Concrete_As-Built 13,307 / 13,354 12,735 12,189 3,517
    Office_Concrete_BuildingPermit 13,342 / 13,389 12,783 12,232 3,608

    The remaining ~550 are elements that Revit's export puts on a different storey from their Level, mostly levels that are not storeys. The building-permit file shows the same pattern, so they do not point to a fault in the as-built file.

    So the element data in Partitions/425 reads normally. What fails is how the walker finds element records in this layout, consistent with your guess about the RE-80 marker. On the Autodesk 2024 samples we saw the same kind of marker drift on the most-saved files (Snowdon Towers, 71 saves; DACH, 83 saves); this file has 426 saves according to its IFC header. The association-record prefix did not drift on any of them, so it may help as an anchor for locating records here.

    Method: Python with olefile and zlib, the checksum-page strip (65,249-byte pages, 353-byte trailer), and every gzip member inflated. Sources: public files and Revit's own IFC export only, with no Autodesk SDK or decompiled code.

  2. helenkwok commented on Oct 13, 2026

    @helenkwok
    Contributor

    Found the cause, and it corrects my guess above: it is not the record marker. In ARK_NordicLCA_Office_Concrete_As-Built.rvt, Global/ElemTable states 72,798 records (a u32 at 0x02). rvt 0.4.0 reads that count as a u16 and gets 7,262, so about 90% of the ElementIds count as undeclared, and the walker rejects every element record whose id is not declared. Levels and Materials survive because their ids sit in the first 7k records.

    This is already fixed on main by 5131dc7, "fix(elem_table): read the table's records from 0x06 (#152)" (#559), which is not in a release yet.

    0.4.0 0.4.0 + the u32 count only main
    Office_Concrete_As-Built, rvt-elements --counts total 106 (4 Level, 102 Material) 13,733 13,744
    Office_Concrete_BuildingPermit (control) 13,156 13,156 13,158

    On main, rvt-ifc writes 12,989 elements on 10 storeys for the as-built file. Against Revit's own IFC4 export of it: walls 628 vs 607, columns 278 vs 279, doors 268 vs 269, windows 269 vs 269, curtain walls 220 vs 220, mullions 10,003 vs 10,003. Floors (31 vs 63 slabs) and rooms (234 vs 308 spaces) are still short; that looks like a separate gap.

    ARK_NordicLCA_Office_Timber_As-Built.rvt has 60,395 records, which fits in a u16, and gives 11,006 elements on 0.4.0 here, so I could not reproduce the problem on that file. Could you check which timber file you saw it on?

    One loose end on main: ElemTableHeader.record_count is still a u16, and the implicit fallback layout uses it, so a file on that fallback with more than 65,535 records would wrap the same way. I have no real file that takes that path.

    Method: bisected v0.4.0..main, and checked that applying only the u32 count to 0.4.0 restores the elements. The probe is examples/probe_745_elemtable.rs on helenkwok/rvt-rs research/745-record-locator. Sources are public files and Revit's own IFC4 export only.

  3. DrunkOnJava commented on Oct 18, 2026

    @DrunkOnJava
    Owner

    Thank you for the report, and to @helenkwok for finding the cause. The as-built file's Global/ElemTable states 72,798 records, and 0.4.0 read that count as a u16 (7,262). About 90% of the ElementIds then counted as undeclared, and every element record with one of those ids was rejected; Levels and Materials survived because their ids sit in the first 7,262 records. main reads the table from 0x06 with its 32-bit count (#559, #152). helenkwok measured 13,744 elements on main against 106 on 0.4.0, and 12,989 exported on 10 storeys, close to Revit's own export class by class (her table is above).

    What's left from this report:

    1. Floors and rooms are short on the as-built file: 31 of Revit's 63 slabs and 234 of its 308 spaces. That's a separate gap, now Nordic LCA office: Revit's export has 44 family instances as IfcSpace (their own Export to IFC As) that rvt-rs writes as proxies #763.
    2. The timber office as-built file. helenkwok couldn't reproduce the failure there: its table has 60,395 records, which fit a u16, and 0.4.0 gives 11,006 elements. If you saw levels and materials only on a timber file, please say which one.

    The fix is on main, not yet in a release; 0.4.0 still has the u16 count. The next release will carry it, and until then a source build has it (docs/install.md). Closing this as fixed on main, with the floors and rooms in #763. Reopen if a file still decodes to levels and materials only on a build from main.

  4. DrunkOnJava commented on Oct 18, 2026

    @DrunkOnJava
    Owner

    The record count fix (#764) shipped in v0.5.0: the ElemTable header's count is read as the u32 it is, so a table of more than 65,535 records keeps them all. The office's remaining slab and space gap is tracked in #763. v0.5.1 is the latest release (pip install -U rvt, cargo install rvt --locked).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions