IFClite TypeScript API
    Preparing search index...

    Interface CostStoreBackendMethods

    interface CostStoreBackendMethods {
        addCostItem(modelId: string, params: CostItemParams): EntityRef;
        addCostQuantity(modelId: string, params: CostQuantityParams): EntityRef;
        addCostSchedule(modelId: string, params: CostScheduleParams): EntityRef;
        addCostValue(modelId: string, params: CostValueParams): EntityRef;
        assignCostItemsToSchedule(
            modelId: string,
            scheduleExpressId: number,
            itemExpressIds: number[],
        ): EntityRef;
        assignToCostItem(
            modelId: string,
            costItemExpressId: number,
            objectExpressIds: number[],
        ): EntityRef;
        nestCostItems(
            modelId: string,
            parentExpressId: number,
            childExpressIds: number[],
        ): EntityRef;
        removeCostEntity(
            modelId: string,
            expressId: number,
            options?: { detach?: boolean },
        ): void;
        setCostItemValues(
            modelId: string,
            itemExpressId: number,
            valueExpressIds: number[],
        ): void;
    }
    Index
    • Assign itemExpressIds (IfcCostItem) to scheduleExpressId (IfcCostSchedule)'s control.

      Parameters

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

      Returns EntityRef

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

      Parameters

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

      Returns EntityRef

    • Nest childExpressIds (IfcCostItem) under parentExpressId as IfcRelNests. A child already nested elsewhere is reparented.

      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 — unless options.detach is set, which rewrites those lists first. Deleting an item detaches it from every IfcRelNests / IfcRelAssignsToControl and cascades to values referenced ONLY by it.

      Parameters

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

      Returns void

    • Replace itemExpressId's CostValues. Pass [] to clear it (written as $).

      Parameters

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

      Returns void