API Reference > imodeljs-backend > iModels > IModelDb > IModelDb.Elements > getElement getElement Method Get an element by Id, FederationGuid, or Code getElement<T extends Element<T>>(elementId: string | Code | ElementLoadProps, elementClass?: EntityClassType<Element>): T throws IModelError if the element is not found, cannot be loaded, or fails validation when elementClass is specified. see IModelDb.Elements.tryGetElement Parameter Type Description elementId string | Code | ElementLoadProps either the element's Id, Code, or FederationGuid, or an ElementLoadProps elementClass EntityClassType<Element> Optional class to validate instance against. This parameter can accept abstract or concrete classes, but should be the same as the template (T) parameter. Returns - T Defined in core/backend/src/IModelDb.ts Line 1570 Last Updated: 12 June, 2024