IFClite TypeScript API
    Preparing search index...

    Class StoreNamespace

    bim.store — document-level edits on a parsed model.

    Use this for raw STEP edits that don't fit bim.mutate.*:

    • addEntity to inject a new entity record
    • removeEntity to drop an existing or newly-added entity
    • setPositionalAttribute to edit non-IfcRoot attributes by index (e.g. IfcRectangleProfileDef.XDim)

    For property-set / quantity / named-attribute edits use bim.mutate.*. For building a model from scratch use bim.create.*.

    Changes accumulate in a per-model overlay and are flushed to the IFC file on the next bim.export.ifc({ applyMutations: true }).

    Hierarchy

    • StoreGroupNamespace
      • StoreNamespace
    Index
    backend: BimBackend
    • Add an IfcColumn to a parsed model, anchored to an existing storey. Emits the full STEP sub-graph (placement, profile, extruded solid, representation, IfcRelContainedInSpatialStructure) into the overlay so the column appears next to the existing model on export.

      Position is the base centre in storey-local coordinates (metres), Width×Depth selects a centred rectangle; Profile selects the canonical parameterised section. RefDirection turns its local X axis in the storey plane, and Height is the +Z extrusion length.

      Parameters

      Returns EntityRef

      const storeyId = bim.query.byType('IfcBuildingStorey')[0].ref.expressId;
      const col = bim.store.addColumn('default', storeyId, {
      Position: [1, 1, 0],
      Width: 0.3, Depth: 0.4, Height: 3,
      Name: 'Column 1',
      });
    • Create the curtain wall and all its members/panels in one undo batch. Metres, storey-local.

      Parameters

      Returns EntityRef

    • Inject a new entity into the active model. Returns an EntityRef pointing at the freshly-allocated expressId.

      Pass def.type as the canonical IFC EXPRESS PascalCase name (e.g. 'IfcRectangleProfileDef'). UPPERCASE STEP tokens are also accepted and silently normalized to PascalCase against the schema registry, so the returned entity.type always reflects the canonical form regardless of how the caller spelled it.

      Attribute conventions (mirror EntityExtractor.extractEntity()):

      • numbers → STEP integer / REAL literal
      • "#42" → entity reference
      • ".AREA." → enum
      • null → $
      • arrays → STEP list (a,b,c) (recursed)
      • any other string → quoted STEP string

      modelId must be one the backend answers for: the headless CLI backend takes 'default' or the file basename and throws on anything else, rather than minting a ref that bim.mutate.* would then refuse.

      Parameters

      • modelId: string
      • def: { attributes: unknown[]; type: string }

      Returns EntityRef

      const profile = bim.store.addEntity('default', {
      type: 'IfcRectangleProfileDef',
      attributes: ['.AREA.', null, '#34', 0.6, 0.4],
      });
    • Create straight tagged grid axes. Position and axis endpoints are metres in their local frame.

      Parameters

      Returns EntityRef

    • Add an IfcDoor filling a new opening in a wall (IfcRelFillsElement). Sill defaults to 0.

      Parameters

      Returns EntityRef

    • Add an IfcWindow filling a new opening in a wall (IfcRelFillsElement), bottom edge at Sill.

      Parameters

      Returns EntityRef

    • Cut an IfcOpeningElement (IfcRelVoidsElement) into a wall (Offset, Sill, Width, Height) or slab (Position [x, y], Width, Depth); the cut spans the host body + 50 mm per face unless CutDepth.

      Parameters

      Returns EntityRef

    • Add an IfcPlate (thin flat element) — rectangle or polygon profile extruded by Thickness. PredefinedType defaults to NOTDEFINED; pass 'CURTAIN_PANEL' / 'SHEET' to override.

      Parameters

      Returns EntityRef

    • Add a railing along Path in storey-local metres, including the handrail and its posts.

      Parameters

      Returns EntityRef

    • Add an IfcRoof — flat-roof slab variant. Same rectangle/polygon profile shapes as addSlab but emits an IfcRoof entity with .FLAT_ROOF. PredefinedType.

      Parameters

      Returns EntityRef

    • Add an IfcSlab. Position is the minimum corner; the slab extends Width along +X, Depth along +Y, and is extruded Thickness upward.

      Parameters

      Returns EntityRef

    • Add an IfcSpace (room/zone) — rectangle or polygon footprint extruded vertically by Height. Aggregated into the storey via IfcRelAggregates (spaces are spatial-structure children, not IfcRelContainedInSpatialStructure products).

      Parameters

      Returns EntityRef

    • Add a storey-local straight-run stair and its aggregated flight; lengths are metres, Direction radians.

      Parameters

      Returns EntityRef

    • Add an IfcStructuralCurveMember between params.Start and params.End, anchored to a storey for its ObjectPlacement. Emits an IfcTopologyRepresentation (IfcEdge between two IfcVertexPoints) as its analytical line geometry.

      Parameters

      Returns EntityRef

    • Add an IfcWall from Start to End (storey-local metres). Profile spans the full length along the wall axis, centred on Thickness, and is extruded upward by Height.

      Parameters

      Returns EntityRef

      bim.store.addWall('default', storeyId, {
      Start: [0, 0, 0], End: [5, 0, 0],
      Thickness: 0.2, Height: 3, Name: 'North Wall',
      });
    • Parameters

      • modelId: string
      • reference: number
      • targets: readonly number[]
      • mode: AlignMode

      Returns Promise<EntityRef[]>

    • Linear spacing/fit or polar span, sharing the viewer's placement planner.

      Parameters

      Returns EntityRef[]

    • Assign itemExpressIds to scheduleExpressId's control via IfcRelAssignsToControl.

      Parameters

      • modelId: string
      • scheduleExpressId: number
      • itemExpressIds: number[]

      Returns EntityRef

    • Associate a material with objects via IfcRelAssociatesMaterial, replacing their previous one. Returns the relationship.

      Parameters

      • modelId: string
      • materialExpressId: number
      • objectExpressIds: number[]

      Returns EntityRef

    • Assign objectExpressIds (products AND/OR tasks) to costItemExpressId's control.

      Parameters

      • modelId: string
      • costItemExpressId: number
      • objectExpressIds: number[]

      Returns EntityRef

    • Assign members/connections into an analysis model, or activities into a load group, via IfcRelAssignsToGroup — the relationship bim.structural.analysisModels()[i].itemGlobalIds and bim.structural.loadGroups()[i].activityGlobalIds read back.

      Parameters

      • modelId: string
      • groupExpressId: number
      • objectExpressIds: number[]

      Returns EntityRef

    • Type objects via IfcRelDefinesByType; an object already typed moves to this type. Returns the relationship.

      Parameters

      • modelId: string
      • typeExpressId: number
      • objectExpressIds: number[]

      Returns EntityRef

    • Apply a structural action/reaction to the member or connection it acts on via IfcRelConnectsStructuralActivity.

      Parameters

      • modelId: string
      • itemExpressId: number
      • activityExpressId: number

      Returns EntityRef

    • Link a structural member to a structural connection via IfcRelConnectsStructuralMember.

      Parameters

      • modelId: string
      • memberExpressId: number
      • connectionExpressId: number

      Returns EntityRef

    • Paste a dependency-pruned selection in storey-local metres/radians.

      Parameters

      • modelId: string
      • expressIds: readonly number[]
      • transforms: readonly CopyTransform[]

      Returns EntityRef[]

    • Duplicate with its hosted graph and a new GlobalId; offset is storey-local IFC XYZ metres.

      Parameters

      • ref: EntityRef
      • options: { Name?: string; offset: [number, number, number] }

      Returns EntityRef

    • Join two walls in the same placement frame; returns IfcRelConnectsPathElements.

      Parameters

      Returns EntityRef

    • Nest childExpressIds (IfcCostItem) under parentExpressId via IfcRelNests. A child already nested elsewhere is reparented: detached from its old rel (which is tombstoned if that empties it) first.

      Parameters

      • modelId: string
      • parentExpressId: number
      • childExpressIds: number[]

      Returns EntityRef

    • Safe-delete an IfcCostSchedule / IfcCostItem / IfcCostValue. Throws, naming referrers, if a value is still listed in another item's CostValues or another value's Components — pass { detach: true } to rewrite those lists first. Deleting an item cascades to values it alone references.

      Parameters

      • modelId: string
      • expressId: number
      • Optionaloptions: { detach?: boolean }

      Returns void

    • Remove an entity. Tombstones existing source entities so they're skipped on export; forgets overlay-only entities entirely. Returns false if the id is unknown to the store.

      Parameters

      Returns boolean

    • Remove a single-flight stair and its flight; shared geometry, styles and materials are retained.

      Parameters

      Returns boolean

    • Parameters

      • ref: EntityRef
      • start: [number, number, number]
      • end: [number, number, number]
      • Optionaloptions: { moveJoinedEnds?: boolean }

      Returns EntityRef[]

    • Replace an IfcCostItem's CostValues. Pass [] to clear it (written as $, never ()).

      Parameters

      • modelId: string
      • itemExpressId: number
      • valueExpressIds: number[]

      Returns void

    • Edit a positional STEP argument on any entity by zero-based index. Use this for non-IfcRoot edits like IfcRectangleProfileDef.XDim (index 3) where the attribute has no symbolic name.

      Parameters

      Returns void

      // Bump the rectangle profile width from 0.3 to 0.6
      bim.store.setPositionalAttribute(profileRef, 3, 0.6);
    • Parameters

      Returns EntityRef[]