Skip to content

feat(elements): name Revit 2023 family instances by their family and type (#421) (RE-109) - #482

Merged
DrunkOnJava merged 1 commit into
mainfrom
feat/names-2023
Sep 28, 2026
Merged

DrunkOnJava merged 1 commit into
mainfrom
feat/names-2023

Conversation

@DrunkOnJava

@DrunkOnJava DrunkOnJava commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

Revit 2023 family instances carry their family and type names (RE-109, #421).

  • The name entry. RE-38's 2024/2025 entry is u64 id · u32 n · UTF-16 · i64 category. On 2023 it is 01 00 00 00 · u32 id · u32 n · UTF-16, with no category. The same shape also frames a lone U+FFFF, so only printable names are read, and an id with two different names gets neither.
  • The type. It is the one id in the element's reference list that is a type record (placement kind 0xffff8000) of its own category with a name entry, wherever it sits. RE-26's rule (the last type slot before the own id) left 7 of Exemplo_data's elements unnamed: a type made after its instance has the larger id, and another type can sit between them.
  • The family. It is the one id the type's own record references that has a name entry and no element record.

Results

against Revit's IFC4 (tools/re/names_vs_ifc.py) family instances with Revit's Name and ObjectType
Exemplo_data 19 of 19 (10 doors, 9 windows; main: 0)
modelo_bim 31 of 31 (10 windows, 8 beams, 8 columns, 4 footings, 1 door; main: 0)

System-family types (walls, floors, roofs) have no type record on 2023 and no entry of this form, so they stay unnamed. The export's 2023 warning says so.

Changes

  • src/partition_names.rs: name_entries_2023.
  • src/partition_schema_mvp.rs: type_and_family_names_2023, wired into recover_2023_records.
  • src/ifc/mod.rs: the 2023 diagnostics warning.
  • reports/element-framing/RE-109-names-2023.md; README, status, supported profile, support matrix, CHANGELOG.

Testing

Unit tests are banned in this repository; none were added.

  • Gates: fmt, clippy -D warnings, rustdoc -D warnings, cargo +1.85.0 check, fuzz workspace check (--locked), and tools/ci/verify-real-files.sh --profile ci with both corpora.
  • End to end against Revit's own exports of both 2023 projects (local only, no licence, sha256 in the report).
  • Every 2024 and 2025 local file is byte-identical to main's apart from the timestamp, so no witness observation changes.

Legal and contribution hygiene

  • Apache-2.0. Byte observations; no Autodesk code.

Breaking changes

None.


Note

Low Risk
Scoped to Revit 2023 decode with fail-closed ambiguity handling; measured against Revit IFC exports and no change to 2024/2025 byte-identical outputs.

Overview
Revit 2023 family instances (doors, windows, columns, beams, footings) now get family and type names from partition bytes, matching Revit's IFC Name and ObjectType on the two measured 2023 projects (19/19 and 31/31).

The decoder adds a 2023-specific name entry scan (name_entries_2023: 01 00 00 00 · u32 id · u32 n · UTF-16, printable-only, rejects duplicate names and lone U+FFFF frames). type_and_family_names_2023 picks the type as the unique same-category symbol record in the element's reference list that has a name (any list position, fixing cases RE-26 missed), and the family as the unique named id referenced by that type with no element record. Resolved values are attached as TYPE_ID / TYPE_NAME / FAMILY_NAME on 2023 recovered instances so the existing IFC path can emit Family:Type:ElementId names.

System-family walls, floors, and roofs stay unnamed on 2023. Export diagnostics and user-facing docs (README, status, support matrix, CHANGELOG) now claim RE-109; 2024/2025 outputs stay byte-identical aside from timestamps per the PR.

Reviewed by Cursor Bugbot for commit 7e8fbcf. Configure here.

…type (#421) (RE-109)

A 2023 name entry is 01 00 00 00, a u32 id and a UTF-16 name, with no category after it. An instance's type is the one same-category type record its list names with a name; its family is the one named id its type's record references with no record of its own. Every door, window, column, beam and footing of the two 2023 projects with a Revit export carries Revit's Name and ObjectType: 19 of 19 and 31 of 31.
@DrunkOnJava
DrunkOnJava enabled auto-merge (squash) September 28, 2026 11:53
@cursor

cursor Bot commented Sep 28, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_9e8c4c86-6965-4b80-a984-e92fa22ce9a6)

@DrunkOnJava
DrunkOnJava merged commit 6cb8958 into main Sep 28, 2026
20 checks passed
@DrunkOnJava
DrunkOnJava deleted the feat/names-2023 branch September 28, 2026 11:56
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.

1 participant