getElement Method

Get an element by Id, FederationGuid, or Code

getElement<T extends Element>(elementId: Id64String | GuidString | Code | ElementLoadProps): T extends Element

throws IModelError if the element is not found or cannot be loaded.

see IModelDb.Elements.tryGetElement

Parameter Type Description
elementId Id64String | GuidString | Code | ElementLoadProps either the element's Id, Code, or FederationGuid, or an ElementLoadProps

Returns - T extends Element

Defined in

Last Updated: 13 June, 2024