IFClite TypeScript API
    Preparing search index...

    Class MutateNamespace

    bim.mutate — Property editing with undo/redo

    Index
    • Batch multiple mutations into a single undo step. Sends begin/end markers to the backend so the mutation adapter can group all enclosed mutations into one undoable operation.

      Parameters

      • label: string
      • fn: () => void

      Returns void

    • batch for asynchronous work (a flow run, a fetch-then-write): the batch stays open across awaits and closes when the promise settles. Other writers on the same backend meanwhile land inside the batch.

      A batchAsync started while another is in flight — nested inside its callback or independent of it — JOINS that batch: no second marker is opened, and the one marker closes when the last of them settles. The two cases cannot be told apart without async context, and both need the same answer: their mutations interleave on the same undo stacks, so one undo step is the only grouping that leaves the model consistent. A second marker would close out of order (label mismatch) or, queued behind its parent, never open.

      Starting one INSIDE a synchronous batch is refused: the sync batch closes before the async work resumes, so its marker would be popped while the async one sits on top — a label mismatch that leaves both open.

      Type Parameters

      • T

      Parameters

      • label: string
      • fn: () => Promise<T>

      Returns Promise<T>

    • Delete a property from an entity

      Parameters

      • ref: EntityRef
      • psetName: string
      • propName: string

      Returns void

    • Redo last undone mutation for a model

      Parameters

      • modelId: string

      Returns boolean

    • Set a root IFC attribute on an entity

      Parameters

      • ref: EntityRef
      • attrName: string
      • value: string

      Returns void

    • Set a property; an optional IFC IfcValue dataType is validated before the write.

      Parameters

      • ref: EntityRef
      • psetName: string
      • propName: string
      • value: string | number | boolean
      • OptionaldataType: string

      Returns void

    • Undo last mutation for a model

      Parameters

      • modelId: string

      Returns boolean