loadProps Method

Obtain the properties of a single element, optionally specifying specific properties to include or exclude. For example, IModelConnection.Elements.getProps and IModelConnection.Elements.queryProps omit the GeometryStreamProps property of GeometricElementProps and GeometryPartProps because it can be quite large and is generally not useful to frontend code. The following code requests that the geometry stream be included:

 const props = await iModel.elements.loadProps(elementId, { wantGeometry: true });

loadProps(identifier: Id64String | GuidString | CodeProps, options?: ElementLoadOptions): Promise<ElementProps | undefined>

throws IModelError if the element exists but could not be loaded.

Parameter Type Description
identifier Id64String | GuidString | CodeProps Identifies the element by its Id, federation Guid, or Code.
options ElementLoadOptions Optionally includes or excludes specific properties.

Returns - Promise<ElementProps | undefined>

The properties of the requested element; or undefined if no element exists with the specified identifier or the iModel is not open.

Defined in

Last Updated: 15 June, 2021