IFClite TypeScript API
    Preparing search index...

    Interface ListDataProvider

    Abstract interface for accessing IFC data during list execution.

    Consumers implement this to bridge their data source (e.g., IfcDataStore, server model, or custom store) to the list engine.

    const provider: ListDataProvider = {
    getEntitiesByType: (type) => myStore.entities.getByType(type),
    getEntityName: (id) => myStore.entities.getName(id),
    getEntityGlobalId: (id) => myStore.entities.getGlobalId(id),
    getEntityDescription: (id) => myStore.entities.getDescription(id),
    getEntityObjectType: (id) => myStore.entities.getObjectType(id),
    getEntityTypeName: (id) => myStore.entities.getTypeName(id),
    getPropertySets: (id) => myStore.properties.getForEntity(id),
    getQuantitySets: (id) => myStore.quantities.getForEntity(id),
    };
    interface ListDataProvider {
        discoverAllColumns?(): DiscoveredColumns;
        getAggregateParents?(expressId: number): number[];
        getAllEntityIds?(): number[];
        getBuildingName?(expressId: number): string;
        getClassifications?(expressId: number): ListClassificationRef[];
        getContainerName?(expressId: number): string;
        getEntitiesByType(type: IfcTypeEnum): number[];
        getEntityDefiningTypeName?(expressId: number): string;
        getEntityDescription(expressId: number): string;
        getEntityGlobalId(expressId: number): string;
        getEntityLongName?(expressId: number): string;
        getEntityName(expressId: number): string;
        getEntityObjectType(expressId: number): string;
        getEntityPredefinedType?(expressId: number): string;
        getEntityTag(expressId: number): string;
        getEntityTypeName(expressId: number): string;
        getMaterialNames?(expressId: number): string[];
        getModelName?(): string;
        getProjectName?(): string;
        getPropertySets(expressId: number): PropertySet[];
        getQuantitySets(expressId: number): QuantitySet[];
        getSiteName?(expressId: number): string;
        getStoreyName?(expressId: number): string;
        getTypePropertySets?(expressId: number): PropertySet[];
        getTypeQuantitySets?(expressId: number): QuantitySet[];
        getWorldPosition?(
            expressId: number,
        ): { x: number; y: number; z: number } | null;
        getZoneAssignment?(
            expressId: number,
            zoneSetId: string,
        ):
            | {
                straddles: boolean;
                touchedZoneNames: string[];
                zoneName: string
                | null;
            }
            | null;
        getZoneSetNames?(): { id: string; name: string }[];
        getZoneVolumeShares?(
            expressId: number,
            zoneSetId: string,
        ):
            | {
                homeValue: number
                | null;
                shares: { value: number; zoneName: string }[];
            }
            | null;
        resolveCapturedScope?(
            scope: CapturedEntityScope,
            modelId: string,
        ): ReadonlySet<number>;
    }
    Index
    • Discover EVERY property set / property and quantity set / quantity in the model — complete and independent of entity-type selection — so the column picker can offer all data even with no type chosen. Optional: when absent, callers fall back to the type-sampled discoverColumns().

      Returns DiscoveredColumns

    • The element's IfcRelAggregates parents (whole of which it is a part), for inherit: 'aggregation' (#5433).

      Parameters

      • expressId: number

      Returns number[]

    • All entity express IDs in the model. Used to target a list at every element regardless of IFC class (when entityTypes is empty).

      Returns number[]

    • IfcBuilding name containing the element, or '' when unplaced. Used by the spatial column at Building level.

      Parameters

      • expressId: number

      Returns string

    • Name of the element's IMMEDIATE spatial container — the direct IfcRelContainedInSpatialStructure parent (a storey, or for infrastructure the IfcBridgePart / IfcRoadPart / IfcSpatialZone it sits in). Falls back to the container's IFC class when the container is unnamed, '' when the element is uncontained. Used by the spatial column at Container level (Bonsai's "container").

      Parameters

      • expressId: number

      Returns string

    • Get all entity IDs matching the given IFC type

      Parameters

      Returns number[]

    • Name of the element's IfcTypeProduct (e.g. "WT-Standard" on an IfcWallType), resolved via IfcRelDefinesByType — the Type attribute column (issue #1754). Distinct from getEntityTypeName (the IFC class) and getEntityObjectType (the instance's own ObjectType attribute). Optional: providers built before this return no Type name. '' when the element has no type.

      Parameters

      • expressId: number

      Returns string

    • Get entity description by express ID

      Parameters

      • expressId: number

      Returns string

    • Get entity GlobalId by express ID

      Parameters

      • expressId: number

      Returns string

    • IFC LongName (e.g. an IfcSpace's room name "Schlafzimmer" next to its number "4" in Name), or '' when the class declares no LongName or it is unset. Used by the LongName attribute column (issue #7385).

      Parameters

      • expressId: number

      Returns string

    • Get entity name (IfcRoot.Name) by express ID

      Parameters

      • expressId: number

      Returns string

    • Get entity object type / predefined type by express ID

      Parameters

      • expressId: number

      Returns string

    • IFC PredefinedType enum token (e.g. "FLOOR", "FLOORING"), or '' when the element has none. Used by the PredefinedType attribute column.

      Parameters

      • expressId: number

      Returns string

    • Get entity tag (IfcElement.Tag) by express ID

      Parameters

      • expressId: number

      Returns string

    • Get IFC type name (e.g., "IfcWall") by express ID

      Parameters

      • expressId: number

      Returns string

    • Material name(s) for the element — top-level material plus any layer / constituent / profile / list-member names.

      Parameters

      • expressId: number

      Returns string[]

    • Source model / file display name — constant for every element the provider serves. Used by the model column to identify which federated file a row comes from. '' when unknown (e.g. single-model legacy path).

      Returns string

    • IfcProject.Name for this model — constant for every element the provider serves (one IfcProject per file). Used by the spatial column at Project level. '' when the model has no named project.

      Returns string

    • Get all property sets for an entity (handles on-demand extraction)

      Parameters

      • expressId: number

      Returns PropertySet[]

    • Get all quantity sets for an entity (handles on-demand extraction)

      Parameters

      • expressId: number

      Returns QuantitySet[]

    • IfcSite name containing the element, or '' when unplaced. Used by the spatial column at Site level.

      Parameters

      • expressId: number

      Returns string

    • Building-storey name the element belongs to, or '' when unplaced.

      Parameters

      • expressId: number

      Returns string

    • Property sets inherited from the element's IfcTypeProduct (via IfcRelDefinesByType), for the automatic Type-property fallback (issue #1745): when a property column/condition finds nothing on the instance, the engine consults these so a value defined once on the type (e.g. Pset_WallCommon.FireRating on IfcWallType) still resolves on every instance row. Optional — providers built before this existed simply have no fallback (behaviour unchanged). Returns [] when the element has no type.

      Parameters

      • expressId: number

      Returns PropertySet[]

    • Quantity sets inherited from the element's IfcTypeProduct — the quantity counterpart of getTypePropertySets (e.g. type-level Qto_WallBaseQuantities). Same optional Type fallback semantics.

      Parameters

      • expressId: number

      Returns QuantitySet[]

    • Parameters

      • expressId: number

      Returns { x: number; y: number; z: number } | null

    • Location-zone assignment (issue #1810) for zoneSetId — a viewer-side classification computed from 3D boxes the user draws, not from IFC pset data. null when no assignment has been computed yet (e.g. no zones defined) or zoneSetId doesn't resolve. touchedZoneNames lists every zone the element's bounds overlap, in the same order the assignment engine found them — non-empty only when straddles is true. Optional: providers built before zones existed simply have no zone column data.

      Parameters

      • expressId: number
      • zoneSetId: string

      Returns
          | {
              straddles: boolean;
              touchedZoneNames: string[];
              zoneName: string
              | null;
          }
          | null

    • Every zone set currently defined, for the column/condition picker to offer by name while storing the durable id.

      Returns { id: string; name: string }[]

    • How much VOLUME of this element sits in each zone of zoneSetId (issue #2508) — the answer to "I cannot get clean quantities per zone without Excel" for the elements that cross a boundary.

      null when no apportionment has been computed for that set (it is an explicit, on-demand action, never part of load), when the element does not straddle, or when its mesh is not a proven closed solid so no volume may be stated for it at all.

      value is in the SAME unit the model declares for volumes, so the shared per-column unit resolver treats it exactly like a declared NetVolume rather than needing a second conversion path. homeValue is the share in the element's home zone, which is the single number a numeric column can carry; shares is the full breakdown for the text one.

      Parameters

      • expressId: number
      • zoneSetId: string

      Returns
          | {
              homeValue: number
              | null;
              shares: { value: number; zoneName: string }[];
          }
          | null

    • Resolve pinned membership to this model's local ids; required for scoped definitions.

      Parameters

      Returns ReadonlySet<number>