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

    • StoreStructuralNamespace
      • StoreNamespace
    Index
    addBeam addClassification addColumn addColumnOnGrid addCostItem addCostQuantity addCostSchedule addCostValue addCurtainWall addDoor addElementType addEntity addGrid addGroup addHostedDoor addHostedWindow addMaterial addMaterialLayerSet addMaterialLayerSetUsage addMember addOpening addPlate addRailing addRoof addSlab addSpace addStair addStorey addStructuralAnalysisModel addStructuralCurveAction addStructuralCurveConnection addStructuralCurveMember addStructuralCurveReaction addStructuralLinearAction addStructuralLoad addStructuralLoadGroup addStructuralPlanarAction addStructuralPointAction addStructuralPointConnection addStructuralPointReaction addStructuralResultGroup addStructuralSurfaceAction addStructuralSurfaceConnection addStructuralSurfaceMember addStructuralSurfaceReaction addWall addWindow alignElements arrayElements assignClassification assignCostItemsToSchedule assignMaterial assignToCostItem assignToStructuralGroup assignType connectStructuralActivityToItem connectStructuralElement connectStructuralMemberToConnection copyElements copyToStoreys deleteStorey deriveStructuralAnalysisModel duplicateElement editHostedElement editRoof editStorey editStructuralEntity joinWalls listStoreyLevels mirrorElements nestCostItems planAddStorey planStoreyDelete planStoreyEdit planStructuralDerivation readGroup removeCostEntity removeEntity removeGroup removeStair removeStructuralEntity renameStorey replaceElement resizeWall roomCommand setCostItemValues setElementSize setPositionalAttribute setTopConstraint splitElements suggestStorey transformElements trimExtendElement updateGroup
    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. Without EdgeSlopes/Overhang it is a flat roof slab (the rectangle/polygon shapes of addSlab, .FLAT_ROOF.). With them it is a roof by footprint: EdgeSlopes[i] (radians, 0 = gable end) slopes the edge from point i to point i+1, the underside passes through every sloped edge at Position's height, and Overhang (metres) carries every edge out. Hip, gable, mono-pitch and L-shaped roofs; change one later with editRoof.

      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 IfcBuildingStorey aggregated under the building, placed like its neighbours. Elements on the storey below that are attached to the storey above theirs re-bind to the new one (#9296).

      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. Refused implicit joins leave the wall added and return notices.

      Parameters

      Returns EntityRef & { notices?: string[] }

      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 CopiedElementRef[]

    • Parameters

      • modelId: string
      • classificationId: number
      • objects: readonly number[]

      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

    • Parameters

      • ...args: [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

    • Parameters

      • ...args: [modelId: string, itemExpressId: number, activityExpressId: number]

      Returns EntityRef

    • Parameters

      • ...args: [modelId: string, RelatingElement: number, RelatedStructuralMember: number]

      Returns EntityRef

    • Parameters

      Returns EntityRef

    • Paste a selection in storey-local metres/radians: one ref per selected element per transform, in selection order. A copy whose top could not follow its new storey is listed in unattachedTops.

      Parameters

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

      Returns CopiedElementRef[]

    • Copy a selection onto each of storeyIds at the same plan position and height above the floor, as one atomic, undoable operation; returns the copies per storey. Attachments re-bind on each storey (#9296).

      Parameters

      • modelId: string
      • expressIds: readonly number[]
      • storeyIds: readonly number[]

      Returns { refs: CopiedElementRef[]; storeyId: number }[]

    • Derive and write one IfcStructuralAnalysisModel linked to the physical elements (#9668). Elements already linked to a structural item are skipped; a file with an analysis model is refused unless whenAnalysisModelExists is 'add'.

      Parameters

      Returns StructuralDerivationResult

    • 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

    • Change a roof made by addRoof with EdgeSlopes/Overhang: one edge's slope ({ Edge: { Index, Slope } }, radians), all of them (EdgeSlopes), Overhang or Thickness (metres). The planes are rebuilt as one undoable edit; a refusal (say, a slope steeper than 85°) writes nothing.

      Parameters

      Returns EntityRef

    • Move a storey (elevation) or the storeys above it (floorHeight) with their contents. Pass the reviewed planStoreyEdit result as expected to refuse the edit if the model changed since.

      Parameters

      Returns EntityRef[]

    • Parameters

      • ...args: [
            modelId: string,
            expressId: number,
            patch: Readonly<
                Record<string, string | number | boolean | readonly number[] | null>,
            >,
        ]

      Returns EntityRef

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

      Parameters

      Returns EntityRef

    • Live storeys, highest first, with floor-to-floor height and element count.

      Parameters

      • modelId: string

      Returns StoreySummary[]

    • 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

    • What addStorey would do: its refusal and the elements it would bind or re-bind. Writes nothing.

      Parameters

      Returns StoreyAddPlan

    • 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

      • ...args: [modelId: string, expressId: number]

      Returns EntityRef

    • 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);
    • Attach a wall's, column's, beam's, member's or curtain wall's top to the storey above its own (storeyAbove, relative), a named storey (storey, explicit) or a slab's underside (slab), or make it fixed; the top is fitted there now and follows later storey edits. Returns what re-meshes.

      Parameters

      Returns EntityRef[]

    • The neighbours' naming and spacing for a new storey above or below referenceStoreyId. Writes nothing.

      Parameters

      • modelId: string
      • referenceStoreyId: number
      • side: "above" | "below"

      Returns StoreySuggestion

    • Parameters

      Returns EntityRef[]