IModelDb.Models Class

The collection of models in an IModelDb.

Methods

Name Description
createModel<T extends Model<T>>(modelProps: ModelProps): T Create a new model in memory.  
deleteModel(ids: Id64Arg): void Delete one or more existing models.  
getModel<T extends Model<T>>(modelId: string, modelClass?: EntityClassType<Model>): T Get the Model with the specified identifier.  
getModelProps<T extends ModelProps>(id: string): T Get the ModelProps with the specified identifier.  
getSubModel<T extends Model<T>>(modeledElementId: string | Code, modelClass?: EntityClassType<Model>): T Get the sub-model of the specified Element.  
insertModel(props: ModelProps): string Insert a new model.  
queryExtents(ids: string | string[]): Promise<ModelExtentsProps[]> For each specified GeometricModel, attempts to obtain the union of the volumes of all geometric elements within that model.  
queryLastModifiedTime(modelId: string): string Query for the last modified time for a Model.  
queryRange(ids: string | string[]): Promise<Range3d> Computes the union of the volumes of all geometric elements within one or more GeometricModels, specified by model Id.  
tryGetModel<T extends Model<T>>(modelId: string, modelClass?: EntityClassType<Model>): undefined | T Get the Model with the specified identifier.  
tryGetModelProps<T extends ModelProps>(id: string): undefined | T Get the ModelProps with the specified identifier.  
tryGetSubModel<T extends Model<T>>(modeledElementId: string | Code, modelClass?: EntityClassType<Model>): undefined | T Get the sub-model of the specified Element.  
updateGeometryGuid(modelId: string): void Mark the geometry of GeometricModel as having changed, by recording an indirect change to its GeometryGuid property.  
updateModel(props: UpdateModelOptions): void Update an existing model.  

Defined in

Last Updated: 15 March, 2024