Skip to main content

create_supertype

Function create_supertype 

Source
pub fn create_supertype(
    tx: &mut Transaction,
    kind: SupertypeKind,
    global_id: &str,
    name: &str,
    draft: SupertypeDraft<'_>,
) -> ElementTypeResult<EntityId>
Expand description

Stage a type definition that carries no PredefinedType.

name is taken by value, not as an Option: NameRequired makes it mandatory for every type object, so there is no legal way to omit it and the signature says so.

§Release

Takes no model, so it writes the IFC4X3 layout with OwnerHistory $ and cannot refuse a model that declares another release; that record is never valid IFC2X3, which requires OwnerHistory. Use create_supertype_in or create_supertype_with_owner_history to write the model’s declared release.

§Errors

Refuses a malformed GlobalId, a blank name (NameRequired), an empty but present property-set list, duplicate property-set names (UniquePropertySetNames), an empty representation-map list, and any attribute the entity’s arity does not reach.