Repository navigation
Description
rvt-rs's IFC carries no Category and no Phase Created on exported elements. Revit's own IFC4 export writes them in the Other and Phasing property sets: on the seven Autodesk Revit 2024 samples that export elements on main (120e2f9), about 25,600 values of each, none of which rvt-rs writes anywhere.
Family and type are already exported (ObjectType, the IfcTypeObject name, and the type object's Tag = type id), and they agree with Revit's on every element that has them. Only the property names differ: Revit writes Family, Family and Type, Type and Type Id in Other on the occurrence, and Family Name (Other) and Type Name (Identity Data) on the type.
Where the values are:
- Category: the element record's BuiltInCategory at
+0x12, already read asm_builtinCategory. The file stores the id, not the name. On the seven samples 57 distinct ids occur across 26,656 elements, and no id appears with two names in Revit's export, so a table of the ids with the English names Revit's export writes gives the property (sub-categories asParent: Name, e.g.Walls: Wall Sweeps). - Phase Created: RE-168 (Element record reference list at +0x88: attribute the remaining slots (leading 3, family/type/level ids) #228) found that the leading slot of the element record's reference list (
+0x88) is the element's phase. Phases areProjectPhaseelements whose name follows the ElementId in a fixed frame:01 00 00 00 | u64 id | 56 x ff | 00 00 00 | u32 n | UTF-16 x n. Taking the one phase id the reference list names gives Revit'sPhase Createdon 38,555 elements of nine Revit 2024 samples, with none wrong. DACH is the discriminating file: it uses two phases (Phase 1 on 20 elements, Phase 2 on 2,586), and they are never confused. The other samples use one phase each, so there the check is only membership.
Limits:
- Revit 2024 only, as for the level parameters (IFC export: write Revit's Level, Base Level, Base Constraint, Top Constraint and Reference Level as properties #750).
- Category names are English, from the table; an id not in it gets no
Category. Phase Demolishedis not covered: no sample demolishes anything.- About 1,250 ducts and pipes per rme sample have no family/type on main; that is unchanged.
- DACH and Snowdon Architectural export no elements on main (Bug: main exports 0-1 elements from Snowdon Towers 2024 Structural/Architectural (ElemTable layout misdetected since 5131dc7, #559) #736). With fix(elem_table): detect the record size by the ElementId, the second id #737 applied locally,
CategoryandPhase Createdare right on both with none wrong, but DACH then shows 14 family/type values that differ from Revit (12 stair runs and 2 walls). Those come from the existing family/type decode (RE-38); this change would only write them under Revit's property names.
Clean-room: public Autodesk Revit 2024 sample files with Revit's own IFC4 export as the oracle; the class name ProjectPhase comes from the file's own schema stream. No SDK source and no decompiled or disassembled code was used.
Activity
DrunkOnJava commentedon Oct 18, 2026
This shipped in v0.5.0 with your #755: Category, Family and Type and Phase Created are in Revit's
Other,Identity DataandPhasingsets. v0.5.1 is the latest release.feat(ifc): Category, family/type and Phase Created in Revit's Other, …