Reference·JavaScript · @bimworks/jssdkJavaScript

Checks

Class in @bimworks/jssdk.

API catalogue · @bimworks/jssdk · Class

TypeScript#
class Checks

API Namespace Checks is used for Model Check related API calls.

Members#

Member Kind Description
constructor Method
downloadCheckGltf Method
downloadCheckResultsAsBcf Method
downloadCheckResultsAsBcfDirect Method Download the check results as a BCF file
getModelCheckDefinitionByName Method
getModelCheckDefinitionByUuid Method
getModelCheckDefinitionSetByName Method
getModelCheckDefinitionSetByUuid Method
listChecks Method
listModelCheckDefinitions Method
listModelCheckDefinitionSets Method
runCheck3 Method Run a BCL (BIM.works Check Language, "Check3") check on a set of models, without storing it as a check definition
runChecks Method
runChecksAsTask Method The RunChecks task, not sent yet: call execAsPromise() on it, or exec() with success and error handlers
runIdsCheck Method Run an IDS check on a set of models

constructor#

TypeScript#
constructor()

downloadCheckGltf#

TypeScript#
public downloadCheckGltf(resourceUuid: string): Promise<unknown>

Parameters#

Name Type Description
resourceUuid string

downloadCheckResultsAsBcf#

TypeScript#
public downloadCheckResultsAsBcf(modelCheckSetUuids: Iterable<string>): Promise<unknown>

Parameters#

Name Type Description
modelCheckSetUuids Iterable<string>

downloadCheckResultsAsBcfDirect#

TypeScript#
public downloadCheckResultsAsBcfDirect(versionUuids: Iterable<string>, type: string, input: string, parameters?: Record<string, unknown> | null): Promise<string>

Download the check results as a BCF file

Parameters#

Name Type Description
versionUuids Iterable<string> The models to check
type string The type of the check, for IDS this should be "IdsCheck", or for a BCL based check "Check3"
input string The check input, for example IDS XML data
parameters Record<string, unknown> | null The values of the $name parameters of a BCL check, by name; every parameter then needs a value. Not for an IDS. Without them a $name stays unbound

Returns#

A Promise, resolving to a URL; rejected when the check is refused

getModelCheckDefinitionByName#

TypeScript#
public getModelCheckDefinitionByName(setUuid: string, name: string): Promise<unknown>

Parameters#

Name Type Description
setUuid string
name string

getModelCheckDefinitionByUuid#

TypeScript#
public getModelCheckDefinitionByUuid(uuid: string): Promise<unknown>

Parameters#

Name Type Description
uuid string

getModelCheckDefinitionSetByName#

TypeScript#
public getModelCheckDefinitionSetByName(name: string): Promise<unknown>

Parameters#

Name Type Description
name string

getModelCheckDefinitionSetByUuid#

TypeScript#
public getModelCheckDefinitionSetByUuid(uuid: string): Promise<unknown>

Parameters#

Name Type Description
uuid string

listChecks#

TypeScript#
public listChecks(): Promise<unknown>

listModelCheckDefinitions#

TypeScript#
public listModelCheckDefinitions(modelCheckDefinitionSetUuid: string): Promise<unknown>

Parameters#

Name Type Description
modelCheckDefinitionSetUuid string

listModelCheckDefinitionSets#

TypeScript#
public listModelCheckDefinitionSets(): Promise<unknown>

runCheck3#

TypeScript#
public runCheck3(versionUuids: Iterable<string>, bcl: string, parameters?: Record<string, unknown> | null): Promise<unknown>

Run a BCL (BIM.works Check Language, "Check3") check on a set of models, without storing it as a check definition

Parameters#

Name Type Description
versionUuids Iterable<string> An iterable of Vid (Version UUID)
bcl string Your check as a BCL string
parameters Record<string, unknown> | null The values of the $name parameters of the check, by name; every parameter then needs a value. Without them a $name stays unbound

Returns#

A Promise that resolves to { modelMapping, results, bcl }, where results.checkResults holds the check results, or rejects with an error (SYNTAX_ERROR with line:column when the BCL does not parse, MISSING_PARAMETER or PARAMETER_TYPE_MISMATCH for the parameters)

runChecks#

TypeScript#
public runChecks(modelCheckDefinitionSetUuid: string, versionUuids: (string)[], checkDefinitionUuids: (string)[] | null, force: boolean | null): Promise<unknown>

Parameters#

Name Type Description
modelCheckDefinitionSetUuid string
versionUuids (string)[]
checkDefinitionUuids (string)[] | null
force boolean | null

runChecksAsTask#

TypeScript#
public runChecksAsTask(modelCheckDefinitionSetUuid: string, versionUuids: (string)[], checkDefinitionUuids: (string)[] | null, force: boolean | null): Task

The RunChecks task, not sent yet: call execAsPromise() on it, or exec() with success and error handlers

Parameters#

Name Type Description
modelCheckDefinitionSetUuid string
versionUuids (string)[]
checkDefinitionUuids (string)[] | null
force boolean | null

runIdsCheck#

TypeScript#
public runIdsCheck(versionUuids: Iterable<string>, ids: string, options?: CallOptions): Promise<unknown>

Run an IDS check on a set of models

Parameters#

Name Type Description
versionUuids Iterable<string> An iterable of Vid (Version UUID)
ids string Your IDS as an XML string
options CallOptions ui: the part of the UI a person asked this from

Returns#

A Promise that resolves to either the results or an error