BimCT SDK / WebGL2 Viewer
    Preparing search index...

    Class BimCTMetadataAccessor

    Class to access BIM CT Design Models Metadata like Tree Structure, Element Properties, etc.

    Index

    Constructors

    Methods

    • Checks if an element is visible.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns boolean

      True if the element is visible, otherwise false.

    • Gets the root element IDs of a model.

      Parameters

      • modelId: Int64

        The model ID.

      Returns Int64[]

      An array of root element IDs.

    • Gets the children element IDs of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns Int64[]

      An array of children element IDs.

    • Gets the contained element IDs of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns Int64[]

      An array of contained element IDs.

    • Gets the path IDs of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns Int64[]

      An array of path IDs.

    • Gets the description of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns { name: string; type: string }

      An object containing the name and type of the element.

    • Gets the geolocation data of a model.

      Parameters

      • OptionalmodelId: Int64

        The model ID (optional).

      Returns ModelLocation

      The geolocation data of the model.

    • Gets the memberships of a model.

      Parameters

      • modelId: Int64

        The model ID.

      Returns MembershipData[]

      An array of membership data.

    • Gets the membership data of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns MembershipData[]

      An array of membership data.

    • Gets the data of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      • includeProperties: boolean = true

        Whether to include properties (default: true).

      Returns ElementData

      The element data.

    • Gets the partial data of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns ElementData

      The partial element data.

    • Gets the name of a model element.

      Parameters

      • modelId: Int64

        The model ID.

      • elementId: Int64

        The element ID.

      Returns string

      The name of the element.

    • Gets the aggregated property values of elements.

      Parameters

      • elementIds: Int64[]

        The element IDs.

      • props: { propName: string; propGroup: string }[]

        The properties to aggregate.

      • visibleOnly: boolean = true

        Whether to include only visible elements (default: true).

      Returns number[]

      An array of aggregated property values.

    • Gets the bulk data of elements.

      Parameters

      • elementIds: Int64[]

        The element IDs, if null all elements are considered.

      • visibleOnly: boolean = true

        Whether to include only visible elements (default: true).

      • aggregateProperties: boolean = false

        Whether to aggregate properties (default: false).

      Returns BulkElementData

      The bulk element data.

    • Returns Promise<void>

    • Checks if the current scene's database exists

      Returns Promise<boolean>

      True if the database exists, false otherwise

    • Creates or loads a database for the current models in the scene

      Parameters

      • persistIfNotLoaded: boolean = false

      Returns Promise<string>

      the name of the database stored in the browser indexDB

    • Checks if the database is initialized

      Returns boolean

      whether the database is created

    • Creates a new database for storing BIM model data

      Parameters

      • Optionaloptions: DatabaseOptions

        Optional database configuration options

      Returns Promise<void>

    • Erases the current database and creates a new empty one

      Returns Promise<void>

    • Persists the current database to browser storage

      Returns Promise<void>

    • Lists all stored database names in browser storage

      Returns Promise<string[]>

      Array of database names

    • Checks if a database is stored in browser storage

      Parameters

      • dbName: string

        Name of the database to check

      Returns Promise<boolean>

      True if the database is stored, false otherwise

    • Loads a previously stored database from browser storage

      Parameters

      • dbName: string

        Name of the database to load

      Returns Promise<void>

    • Deletes a stored database from browser storage

      Parameters

      • dbName: string

        Name of the database to delete

      Returns Promise<void>

    • Exports the modelId to the database

      Parameters

      • OptionalmodelIds: Int64[]

        IDs of the model to export (if null exports all models)

      Returns Promise<void>

    • Executes a SQL query on the database

      Parameters

      • query: string
      • Optionalparams: SqlValue[]

      Returns Promise<QueryResult[]>

    • Executes an update query on the database

      Parameters

      • query: string
      • Optionalparams: SqlValue[]

      Returns Promise<number>

    • Gets the database manager instance

      Returns BimDatabaseManager

    • Exports the database to a file

      Returns Uint8Array

    • Imports a database from a file

      Parameters

      • data: Uint8Array

      Returns Promise<void>

    • Downloads the SQLite database to the browser as a .sqlite file

      Returns void

    • Downloads an optimized SQLite database to the browser as a .sqlite file This includes VACUUM and ANALYZE for minimal file size

      Returns Promise<void>