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.  
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: 29 November, 2022