BIM.works SDKs - v3.0.0-b.115
    Preparing search index...

    API Namespace BIM is used for BIM related API calls.

    Index

    Constructors

    Properties

    virtualFeatures: unknown

    The virtual-feature selection every query of this client sends by default; change it with Bim.setVirtualFeatures

    Methods

    • The clashes between the objects of two BQL conditions on two versions (task CalculateClashes2, the pure-Java detector). Resolves to the pairs (each with qid1, qid2 and the detector's verdict: kind, tier, depth), or with options.with_stats to {clashes: [...], stats: {...}}.

      Parameters

      • versionUuid1: string
      • query1: string
      • versionUuid2: string
      • query2: string
      • Optionaloptions: {
            margin_mm?: number;
            predicate?: "INTERSECTS" | "TOUCHES" | "CONTAINS" | "CONTAINED_IN";
            with_stats?: boolean;
        }
        • Optionalmargin_mm?: number

          the predicate's margin in mm (default: the instance's tolerance for the predicate)

        • Optionalpredicate?: "INTERSECTS" | "TOUCHES" | "CONTAINS" | "CONTAINED_IN"

          INTERSECTS (default), TOUCHES, CONTAINS or CONTAINED_IN

        • Optionalwith_stats?: boolean

          also return the run's counters (candidates, tiers, broad phase, time)

      Returns Promise<unknown>

    • Re-run the discipline classifier for the Version's model content. Applies the result to the version unless its discipline was set by a user. Returns the classification badge.

      Parameters

      • versionUuid: string

        the Vid of the Version

      Returns Promise<unknown>

    • A full export of the versions; resolves with its download URL

      Parameters

      • versionUuids: Iterable<string>

      Returns Promise<string>

    • Get the discipline of the given Version. Fails with NO_DISCIPLINE when none is set.

      Parameters

      • versionUuid: string

        the Vid of the Version

      Returns Promise<Discipline>

    • The stored automatic discipline classification of the Version's model content — scores, tags and the evidence breakdown. Fails with NO_DISCIPLINE when none is stored.

      Parameters

      • versionUuid: string

        the Vid of the Version

      Returns Promise<unknown>

    • List all available disciplines, in enum order: the name, the display name and the umbrella value it specializes (null for a top-level value). A filter on an umbrella value matches its descendants.

      Returns Promise<{ name: Discipline; nice_name: string; parent: Discipline | null }[]>

    • Using "any" on purpose here, otherwise crazy casting required

      Parameters

      • models: Iterable<string>

      Returns Promise<unknown>

    • Query one or more model versions. Records follow the GET columns; dotted features are nested objects.

      Parameters

      • models: Iterable<string>

        One or more version UUIDs

      • query: string

        The query (BQL) to execute

      • OptionaluseCache: boolean | BimQueryOptions

        Whether the results should internally be cached so that future calls to the same query+models are faster. Defaults to false. Use this judiciously as the results are cached in memory until the BimWorksClient is closed

      • OptionalforceGetQid: boolean

        Queries without a GET statement will automatically returns Qids only, but BQL with a GET statement does not. Setting this parameter to true (default: false) forces Qids to be returned even when not included in the GET statement

      • Optionalparameters: Record<string, unknown>

      Returns Promise<unknown>

      A Promise that resolves to the query results, currently untyped.

    • As Bim.query, but returns the Task instead of running it, so progress and error handlers can be attached first. The task's success handler receives the result objects.

      Parameters

      • models: Iterable<string>
      • query: string | object

        BQL text, or a parsed query (see QueryHelper)

      • OptionaluseCache: boolean
      • OptionalforceGetQid: boolean
      • Optionalparameters: Record<string, unknown> | null

      Returns Task

    • Count the objects a query matches without retrieving the records.

      Parameters

      • models: Iterable<string>

        One or more version UUIDs

      • query: string

        BQL query; a grouped query counts groups

      • OptionaluseCache: boolean

        Reserved compatibility argument; this method does not cache results

      • Optionalparameters: Record<string, unknown>

        Named BQL parameter values, without the leading dollar sign

      Returns Promise<number>

      The count returned by the QueryCount task

    • One slice of a grouped query (GROUP BY slice mode): the groups below the addressed group, or, when the path names a leaf group, its member objects. A group is addressed by groupKeys (the groupKey every slice record carries; keeps its meaning when the set of models changes) or by groupPath (indices into each level's sorted groups; only valid for one set of models). Without either: the first level.

      Parameters

      • models: Iterable<string>

        The Vids of the models that you want to query

      • query: string

        A BQL query with a GROUP BY

      • Optionaloptions: {
            groupKeys?: string[];
            groupPath?: number[];
            parameters?: object;
            virtualFeatures?: unknown;
        }

      Returns Promise<
          {
              groupLevel: number;
              groups: unknown[]
              | null;
              objects: unknown[] | null;
          },
      >

      A Promise of {groupLevel, groups, objects}, one of groups and objects being null

    • As Bim.queryGroups with a group path, returning the Task; its success handler receives {groupPath, groupLevel, groups, objects}

      Parameters

      • models: Iterable<string>
      • query: string | object
      • groupPath: number[]
      • OptionalforceGetQid: boolean

      Returns Task

    • The objects a query matches as bare ids, without a record being written or parsed: the cheap way to get the members of something large. The query is a plain one (no aggregate, no ORDER BY), or a grouped one with groupKeys / groupPath addressing a group at any level: its members.

      Parameters

      • models: Iterable<string>

        The Vids of the models that you want to query

      • query: string

        The query to execute

      • Optionaloptions: {
            groupKeys?: string[];
            groupPath?: number[];
            parameters?: object;
            virtualFeatures?: unknown;
        }

      Returns Promise<Map<string, Int32Array<ArrayBuffer>>>

      A Promise of a Map of version uuid to the ascending oids of that version

    • Specialized (and optimized) call to execute a query and get the results as a QidSet. Regardless of any GET statements that are included in the BQL query, only Qids will be retrieved

      Parameters

      • models: Iterable<string>

        The Vids of the models that you want to query

      • query: string

        The query to execute

      • OptionaluseCache: boolean

        Whether the results should internally be cached so that future calls to the same query+models are faster. Defaults to false. Use this judiciously as the results are cached in memory until the BimWorksClient is closed

      Returns Promise<QidSet>

      A Promise that resolves to a QidSet

    • As Bim.queryQids, returning the Task; its success handler receives a QidSet

      Parameters

      • models: Iterable<string>
      • query: string | object
      • Optionalparameters: Record<string, unknown> | null

      Returns Task

    • Set the discipline of the given Version

      Parameters

      • versionUuid: string

        the Vid of the Version

      • discipline: Discipline | null

        The new discipline, or null to clear it

      Returns Promise<void>

    • Set the multi-label disciplines of the given Version. The first entry becomes the primary; an empty array clears all discipline fields.

      Parameters

      • versionUuid: string

        the Vid of the Version

      • disciplines: Discipline[]

        The disciplines, primary first

      Returns Promise<void>

    • Sets the default virtual-feature selection ("enabled", "none", uuids, ...); cached query results are dropped

      Parameters

      • virtualFeatures: unknown

      Returns void

    • Validate a BQL query without running it

      Parameters

      • query: string

      Returns Promise<{ messages: QueryValidationMessage[] }>

      A Promise that fails with the error (SYNTAX_ERROR, with line and column) when the query does not parse, and otherwise resolves to the validator's warnings and errors about it (an IFC class in the wrong case, an unknown attribute, ...); messages is empty for a clean query