IFClite TypeScript API
    Preparing search index...

    Function convertStepLine

    • Convert a raw STEP entity line from one schema version to another.

      Handles: 1. entity type names; 2. attribute counts (trim for older schemas, pad trailing $ for attributes a newer schema APPENDED, e.g. IFC4's PredefinedType on IfcWall); 3. entities with no target representation; 4. enum members the target lacks (enums, #5365).

      Parameters

      • line: string

        Raw STEP entity line (e.g., "#1=IFCWALL('guid',...);")

      • fromSchema: IfcSchemaVersion

        Source schema version

      • toSchema: IfcSchemaVersion

        Target schema version

      • Optionalrandom: RandomSource

        Optional seeded RandomSource for the GlobalId of any IFCPROXY placeholder minted here; pass one when output must be byte-reproducible.

      • Optionalslots: Ifc2x3SlotFill

        Reuses OwnerHistory (#4686) and counts unsettled slots. Without a collector, required-slot filling uses the generated defaults.

      • OptionalwithheldRefIds: ReadonlySet<number>

        Express ids this export is OMITTING outright (computeWithheldRefIds, #4206) — a record whose attributes name one is redirected to the same "no representation" resolution as its own unmapped type would get, so it cannot ship a now-dangling #N.

      • Optionalifc4Slots: Ifc4SlotCheck

        Counts required slots left $ against the target (IFC4X3/IFC5 → IFC4, #5202; mapped or structural IFC2X3 → IFC4, #10763, or → IFC4X3, #11135).

      • Optionalenums: EnumReconciliation

        Resolves enum members the target lacks and reports losses (#5365).

      • OptionalmaxReferenceId: number

        Bound for remapped STEP ids; source conversion uses the parser's u32 bound.

      Returns string | null

      A converted STEP line (possibly an IFCPROXY), or null for an omitted record, including unbound space boundaries on upgrade and IfcMaterialProperties without a single material (#10763).