getModel Method

Get the Model with the specified identifier.

getModel<T extends Model>(modelId: Id64String, modelClass?: EntityClassType<Model>): T extends Model

throws IModelError if the model is not found, cannot be loaded, or fails validation when modelClass is specified.

see IModelDb.Models.tryGetModel

Parameter Type Description
modelId Id64String The Model identifier.
modelClass EntityClassType<Model> Optional class to validate instance against. This parameter can accept abstract or concrete classes, but should be the same as the template (T) parameter.

Defined in

Last Updated: 18 November, 2020