Skip to content

Multistory stairs: Revit writes the stair once per storey (a ":2" copy with its flights, stringers, landing and railings), rvt-rs writes it once #1977

Open

Description

@DrunkOnJava

Found comparing rvt-rs's export of Autodesk's Snowdon Towers architectural sample with Revit's own IFC4 export of it (both local; counts and relations here). RE-65 and RE-68 already say that "Revit writes a multistory stair once per storey under one Tag" and measure names and storeys "against any copy"; no issue tracked the copies themselves, which rvt-rs does not write.

What differs. The sample has three multistory assembled stairs (621690, 701090, 882250; connected from L3 to L4). Revit writes each of them twice: the stair on L3 and Assembled Stair:Stair:<id>:2 on L4, and under each of the two its own parts. Beyond rvt-rs's count of the same Tag and class, Revit's export holds 53 entities:

Class More in Revit What they are
IfcStair 3 the :2 stair of each
IfcStairFlight 6 Run n:2 of each stair's two runs, aggregated under the :2 stair
IfcMember 30 Stringer n:2, 10 per stair, STRINGER
IfcSlab 3 each stair's landing
IfcRailing 11 each railing of the stair a second time, same name, aggregated under the :2 stair

Every other IfcStair, IfcStairFlight, IfcMember and IfcRailing Tag has the same count on both sides.

What the copy is, measured on the 30 stringer pairs (from the exports' own meshes): same extents and the same volume as the original, and the centre exactly 0.000, 0.000, +4.064 m from it on 30 of 30, a pure vertical translation of one storey height. The copy's GlobalId is not the original's with a changed tail: all 16 bytes differ on the 30 pairs, so a rule for it is a finding of its own before anything is written.

What is not known. Where the file says the stair is multistory and which Levels it connects: the schema has MultistoryStairs (6 fields) and MultistoryStairsDataCell (3). The first step is a probe that lists them for the three stairs, with the connected Levels' elevations, against Revit's copies (storey L4, shift 4.064 m).

Rows to register before the change (to be run on the kept exports of an unfiltered Measure, scored locally against Revit's export, counts only):

  1. The probe: the three stairs name their connected Levels in their own records and the elevation differences equal the shift of the copies, on 3 of 3.
  2. The change: rvt-rs writes the copies, 53 entities, each within 1 mm of Revit's copy and aggregated and named as Revit's are; the entity counts per Tag and class of the Snowdon architectural export equal Revit's for these five classes.
  3. Every other export of the 146 models is byte-identical to main's, or the difference is a multistory stair named by its record (the probe says which files hold a MultistoryStairs record).
  4. The GlobalId of a copy is left to its own finding (what Revit derives it from) and the copies are written without one that claims to be Revit's, or the finding comes first.

Measured on Snowdon Towers only (Revit 2024), so by RE-353 the rule runs on 2024 only until another release has a Revit export of a multistory stair. Stair flights and landings may ship as labelled approximations (Griffin, 2026-10-24); a stringer or a railing is not among them.

Activity

  1. added
    area:elements
    area:ifc
    priority:P3
    type:bug
    on Nov 14, 2026
  2. changed the title [-]Snowdon Towers: 30 stair stringers are two IfcMembers in Revit's export (Stringer N and Stringer N:2) and one in rvt-rs's[/-] [+]Multistory stairs: Revit writes the stair once per storey (a ":2" copy with its flights, stringers, landing and railings), rvt-rs writes it once[/+] on Nov 14, 2026
  3. DrunkOnJava commented on Nov 14, 2026

    @DrunkOnJava
    OwnerAuthor

    What the file says (RE-463, #1991): the copies fill the one Level span no set of stairs covers.

    The probe ran on Snowdon Towers architectural (43551707746, 43553309916). The three multistory records (621689, 701089 and 882249) each list sets of 14 elements in their ElementIdIndexPairSet (a stair, a landing, 2 runs, 10 supports), and the stair of each set is an ordinary element between two Levels that rvt-rs already writes once:

    Group Level spans the sets' stairs cover Span no set covers
    621689 Parking to L1 - Block 35, L1 - Block 35 to L2, L2 to L3, L3 to L4, L5 to R2 L4 to L5
    701089 L2 to L3, L3 to L4, L5 to R2 L4 to L5
    882249 L2 to L3, L3 to L4, L5 to R2 L4 to L5

    L4 to L5 is 4.064 m, the height of the L3 to L4 stair (24 risers, 13.333 ft), and Revit writes that stair a second time on L4 with its parts: one copy per uncovered span, 3 of 3. The other stairs are 1 entity in both exports. The probe is not a read of a stored range: m_multistoryUpToLevelId is -1 on every stair, the MultistoryStairsDataCell the schema declares is not among the records' objects, and m_excludedBaseLevelIds is empty, so the span is inferred. rac_advanced holds five groups of one set each (no uncovered span by this rule; whether Revit repeats them is for a Revit export of it, racadv, to say).

    tools/re/multistory_copies_vs_ifc.py reads Revit's export against rvt-rs's: 106 entities against 53 on the three stairs (3 IfcStair, 6 IfcStairFlight, 30 IfcMember, 3 IfcSlab, 11 IfcRailing more in Revit), and the 30 stringer copies sit exactly 4.064 m above their originals.

    GlobalId: still unknown. The copy's GlobalId differs from the original's in all 16 bytes, and 10,068 key shapes per pair built from revit-ifc's GUIDUtil hash keys (Sub-element with index, entity, level, copy and assembly parts; type:name:guid; project plus key) over the 66 pairs reproduce none.

    Rows for the change, registered before any change (this issue stays open for it):

    1. Each span between consecutive Levels that no set's stair covers (from the lowest base to the highest top of a group's sets), with the height of the stair of the span below it, gets a copy of that stair's set shifted up by the Level elevation difference. On Snowdon architectural: 3 copies of 14 elements and 11 railings, the 53 entities, named :2 as Revit names them, the stair in the storey of the span's base Level (L4), the parts aggregated under it.
    2. The scorer reads 53 entities more in Revit before and 0 after, every copy's shift within 1 mm of Revit's.
    3. Every other export of the 146 models is byte-identical to main's (no other model holds a group with an uncovered span).
    4. A copy's GlobalId is rvt-rs's own and the diagnostics say so, or the rule is found first.
  4. DrunkOnJava commented on Nov 14, 2026

    @DrunkOnJava
    OwnerAuthor

    What one of Revit's copies holds, read from its export of all three stairs (Snowdon Towers architectural, local only): the shape the change has to write.

    Each copy is the original set again with these differences, and no other:

    original (L3) copy (L4)
    Stair Assembled Stair:Stair:621690, HALF_TURN_STAIR, Tag 621690 the same Tag and PredefinedType, name Assembled Stair:Stair:621690:2
    Placement 243.6368 in Revit's frame +4.064 m, 247.7008
    Storey L3 L4 (the Level the uncovered span starts at)
    Type object IfcStairType Assembled Stair:_Stair-Metal-Plate Stringer none
    Parts 10 stringers, 1 landing, 2 flights, and 4, 3 and 4 railings on the three stairs, all aggregated under the stair the same 17, 16 and 17, aggregated under the copy, with the originals' Tags
    Part names ... Stringer 1, ... Landing 1, ... Run 1 the same with :2 appended; a railing keeps its name
    Flight PredefinedType STRAIGHT (2 of 2, on all three stairs) NOTDEFINED (2 of 2, on all three)
    Property sets Pset_StairCommon, Pset_StairFlightCommon, Pset_EnvironmentalImpactIndicators the same three
    GlobalId the stair's own all different, each entity's

    On rvt-rs's side the original set is already Revit's: the stair, its 10 stringers, landing, 2 flights and 4 railings of 621690 are written with Revit's names, Tags and GlobalIds, and the PredefinedTypes of all but the railings (Revit writes NOTDEFINED on them and rvt-rs none, #1713), in run c802574c. The copy is that set shifted, renamed and re-typed, not a new reading.

    What this fixes for the change, added to the registered rows:

    1. A copy shares its original's Tag, which the writer already handles: the first entity with a Tag takes Revit's GlobalId and each further one is derived from it and its place among the entities sharing the Tag (A layered floor's parts take new GlobalIds on every save of a Revit 2027 model (#1829) #1840), so row 4 (rvt-rs's own GlobalId for a copy) needs no new derivation.
    2. The writer types an element by its Tag (type_objects), so the copies must be left out of that grouping to match "type: none".
    3. The saved-mesh pass keys its candidates by Tag and takes several entities for one, so it sees the copies too: check that it places each by its own location.
    4. The scorer's row 2 gains: every copy's name, storey, flights' PredefinedType and the absence of a type object equal Revit's, on 3 of 3.
  5. DrunkOnJava commented on Nov 14, 2026

    @DrunkOnJava
    OwnerAuthor

    The rows hold; #1995 is merged as dc6b4721. The issue stays open for what the copies still are not.

    On Revit 2024 a multistory stair is now written again for each span between two consecutive Levels of its group's stairs that no set covers, when the span is as high as the stair that ends where it begins. Measure runs of the merged code 9a1cfa41: 43570550993 (unfiltered, scored: gates pass); 43568153235 and 43568156861 (kept exports, timed) at 48cbcd04, whose Snowdon export is byte-identical.

    1. Holds. Revit's beyond rvt-rs's on Snowdon Towers architectural: 53 before (3 IfcStair, 6 IfcStairFlight, 30 IfcMember, 3 IfcSlab, 11 IfcRailing), 0 after in every class, and 0 the other way.
    2. Holds, wording corrected. Of the 53 entities, 53 of 53 equal Revit's in name, storey and type object, 42 of 53 in PredefinedType (the 11 railings carry none where Revit writes NOTDEFINED, as their 62 originals do, PredefinedType: Revit's export writes one that rvt-rs leaves none or NOTDEFINED on, on walls, railings, ramps, roofs, proxies, light fixtures, pipe segments and stairs (42 models with a Revit export) #1713), and the 50 with a body of their own are within 1 mm, 50 of 50. The row said no type object; Revit's stringer copies keep theirs (30 of 30), so only the stair, its flights, its landing and its railings go without.
    3. Holds. Main's 6,953 Snowdon products are unchanged and exactly these 53 are added; the export's 97,401 GlobalIds are distinct.
    4. Holds. 119 of 120 exports and 101 of 102 diagnostics.json files are byte-identical to main's; the one that moves is Snowdon architectural. (The row said 146 models; the run compares 120 exports.)
    5. Holds at the merged code; the first version failed it. Snowdon architectural 1.02 in time and 1.00 in peak, rac_advanced 2024 1.02 and 0.99. The first version read the groups after the saved-graphics pass and inflated the whole file again (1.05 and 1.51, run 43566139741); the merged code reads them once before that pass and keeps no record index (Options::index_records).

    Why this stays open.

    • The uncovered-span rule is inferred from three groups of one building, and no other file has a Revit export of a multistory stair. A longer gap, another height or no stair of that height below is in no file measured: the pass counts such a span in the export notes and writes nothing for it.
    • A copy's GlobalId is rvt-rs's own (derived from the original's by the A layered floor's parts take new GlobalIds on every save of a Revit 2027 model (#1829) #1840 rule, MultistoryCopyOf marks it); no revit-ifc key shape reproduces Revit's (RE-463 section 2).
    • Revit 2024 only; other releases have no Revit export of a multistory stair to measure against.

    It closes when a second building with a Revit export tests the rule, or a way to read the GlobalIds is found.

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

    area:elementsarea:ifcpriority:P3type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions