Skip to content

feat(params): built-in parameters are named #1962 - #2303

Open
puzzbobb wants to merge 1 commit into
DrunkOnJava:mainfrom
puzzbobb:feat-1962-builtin-param-names
Open

puzzbobb wants to merge 1 commit into
DrunkOnJava:mainfrom
puzzbobb:feat-1962-builtin-param-names

Conversation

@puzzbobb

@puzzbobb puzzbobb commented Dec 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #1962. A built-in parameter (a negative id) has no definition in the file, so rvt-rs listed it by id with no name, and a family type's built-in slots (a window type's Width and Height) were not read because all four slot fields are filled. Both are now measured against Revit's own IFC export with "Export Revit property sets" (RE-507):

  • probes/examples/probe_re507_builtin_parameter_values.rs prints every built-in value rvt-rs reads, and with --slots every field of an unresolved built-in slot.
  • tools/re/builtin_parameter_labels.py pairs them by Tag and value with Revit's export and names an id only where one property is its best match, contradicted on at most 5%, told apart from the runner-up, matched on two values or more (texts aside), named alike by every element class, and not shared value-for-value with another id. Its --rust output is the table in src/research/builtin_parameter_names.rs, with each name's group, kind, slot field and the IFC classes Revit showed it on.

49 ids are named on puzzbobb's 19 Revit 2025 models (CI-fetchable) and, local only, Snowdon Towers HVAC and Architectural; 20 match on the R2025 models, 29 on Snowdon alone (local_only in the table). 29 carry the slot field holding them: Width and Height are m_value, Revit's value on 88 and 93 window types, none contradicted.

What changes

  • RE-207's reader names those built-ins, reads those slots, gives a length/area/volume/angle its SI value, and names an ElementId that names a Level or a project phase (so Phase Created and the levels pair).
  • rvt-ifc --revit-property-sets writes them in the set and on the IFC classes Revit's export showed them in.
  • The viewer's wording for a nameless built-in; docs, matrix, schema, changelog fragment.

Measured

tools/re/revit_property_sets_vs_ifc.py, main a408cb34 against this branch, locally (IfcOpenShell 0.9.0.post1):

models equal before equal after
Snowdon Architectural (local only) 59,204 78,057
Snowdon HVAC (local only) 49,925 53,594
the 19 R2025 models 2,502 3,300

The R2025 differences (126 -> 210) are all Revit 2025's 1/304.8² lengths, which the scorer counts. The default export is unchanged (line for line apart from the timestamp on Core Interior, Snowdon HVAC and Architectural and three R2025 models). RE-507 §6 lists the remaining new mismatches and why. A Measure run with -f r2025=true should confirm the R2025 figures on the runners.

Clean-room

The changes in this PR are based on public byte observations of the files above and on Revit's own IFC exports of them (CLEANROOM.md sources 1 and 5, revit-ifc read for what the export writes and not copied). I have not used Autodesk SDK source, ODA SDK source, leaked internal documentation, NDA material, or decompiled internal Revit implementation code beyond public symbol exports, and I have not copied or translated code from revit-ifc. No catalog of built-in names from any other source was read: every name is one Revit's export wrote.

Checks

cargo fmt --check, cargo clippy -p rvt --lib --all-features -D warnings, clippy on the probe, rustdoc -D warnings with and without unstable-research, cargo +1.87 check, changelog.py check, api-doc-ids.py, readme-matrix.py --check, measured_numbers.py, and the corpus tests element_parameters and revit_property_sets (6 passed) with the R2025 and BIM4LCA files.

…names them, and a window type's Width and Height are read (DrunkOnJava#1962) (RE-507)

A saved value whose parameter id is negative has no definition in the
file, so it had no name (RE-207 §7), and a family type's built-in slots
fill all four fields with nothing saying which holds the value. Both are
now measured against Revit's IFC export with "Export Revit property
sets": probe_re507_builtin_parameter_values prints each built-in value
(and, with --slots, each slot field), and
tools/re/builtin_parameter_labels.py pairs them by Tag and value with the
export's properties, names an id only where one property is its clear,
uncontradicted best match on two values or more, and prints the rows of
src/research/builtin_parameter_names.rs.

On puzzbobb's 19 Revit 2025 models and, local only, Snowdon Towers HVAC
and Architectural, 49 ids are named, 29 with the slot field that holds
them: a window type's Width and Height are m_value, Revit's value on 88
and 93 types and none contradicted. RE-207's reader names them, reads
those slots, gives a length, area, volume or angle its SI value, and
names an ElementId naming a level or phase. rvt-ifc
--revit-property-sets writes them in the set and on the IFC classes
Revit's export showed them in: properties equal to Revit's on Snowdon
Architectural 59,204 -> 78,057, HVAC 49,925 -> 53,594, the R2025 models
2,502 -> 3,300. The default export is unchanged.

The names come only from Revit's own exports of these files (CLEANROOM
sources 1 and 5); no catalog from any other source was read.
@puzzbobb
puzzbobb requested a review from DrunkOnJava as a code owner December 6, 2026 12:31
@DrunkOnJava

Copy link
Copy Markdown
Owner

@puzzbobb, thank you for this and the four after it. Named built-in parameters are what #1962 has been waiting for, and each name measured against Revit's own export is what makes them checkable.

One fix before CI can pass: RE-507 is already on main (the framing usage report), and #2304 to #2307 take RE-508 to RE-511, so this report needs the next free id, RE-512. The id check is the only red, and I ran main's other offline checks from the PII guard job on your head (doc ids, unit-test counts, README table, changelog fragments): all pass. The rename covers the report, its references in the code and docs, and the probe's name.

Next, ours: a read of the change and a full Measure run on its head, with what it shows posted here.

@DrunkOnJava

Copy link
Copy Markdown
Owner

@puzzbobb, one more thing: this branch predates today's framing changes on main (#2295, #2298), so the same-project check can't pass on its head as it stands. A merge of main into the branch (not a rebase) fixes that. If it's easy, in the same push as the RE-512 rename.

@DrunkOnJava

Copy link
Copy Markdown
Owner

@puzzbobb, what the measurements show so far, before the code read. All runs are on a merge of main into your head (a scratch branch here, 3bd3a948), since the head predates #2295 and #2298.

  • Default export: unchanged, as you say: 101 of 101 exports and diagnostics identical (run 47650849155).
  • With --revit-property-sets (run 47654828689): 99 exports and 86 diagnostics move. Only the 19 Revit 2025 models with Revit's own sets are scored, by the figures in your §6: 2,502 → 3,300 equal, 126 → 210 different (all at 1/304.8², the class main already writes), 18 not written by Revit and 0 in another set, both unchanged. Nothing checks the other 80 against a Revit export. On model 12 (run 47656981011, exports kept), every changed line is a property, a set, its relation, or a relation or type object renumbered or listing one more set; the Window-Fixed:24" x 36" type gets Width 0.6096 m and Height 0.9144 m, its name's 24" and 36", where Revit's export writes them at 1/304.8².
  • Held out, with the flag (run 47654350306): Measure scores Revit's sets on no held-out model, so this run can't check the names; no scorer moves and the validation counts are unchanged.

What stands in the way so far, besides RE-512 and the merge of main:

  1. Three names are wrong on some elements, by your own Snowdon Architectural figures. The rule here is that a value rvt-rs adds is never wrong where it's measured: a name right on most elements is narrowed until it is right on all of them, or left out, and what it leaves out is reported.
    • Unconnected Height on the 7 walls whose top is attached to a level;
    • Top Offset on the 18 walls whose top is unconnected, where Revit writes none;
    • Calculate Coefficient of Utilization on the 4 lighting fixtures.
      Reading a wall's Top Constraint would narrow the first two. Until something does, those three stay out of the export.
  2. Per id, the matched and contradicted counts, for all 49, split between the R2025 models and Snowdon. Your rule 1 lets a name through at up to 5% contradicted, so the table is what shows which names are never wrong. While you're there, §6's parts of the 193 more in another set (183, one Description, one Type Comments) come to 185.
  3. The full SHA-256 of each Snowdon file and export in the report, in place of the shortened ones. Counts only otherwise, please, and no Snowdon exports: a Revit export of it carries its site.
  4. The 29 names matched on Snowdon alone can ship the way feat(ifc): a column that names three or more Levels, and a footing that names none, are put in a storey on Revit 2027, as in the one structural model that holds them (#1842) (RE-469) #2013's storey rules did from a Revit 2027 model we don't hold: none contradicted, marked in what rvt-rs writes, and listed on the one-project page. For the marking, a count in the export's diagnostics of the values written under a local_only name would do. The one-project rows are mine, once it lands.

Next, yours: the rename, the merge of main, and points 1 to 4. Then ours: a Measure run on the new head, and the code read.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Saved parameters: built-in parameters' names and a family's built-in slots (#35 follow-up, RE-207)

2 participants