insertElement Method

Insert a new element into the iModel.

insertElement(elProps: ElementProps, options?: InsertElementOptions): string

@returns The newly inserted element's Id.

@throws EditTxnError if this EditTxn is not active.

@throws ITwinError if insertion fails.

Parameter Type Description
elProps ElementProps The properties of the new element.
options InsertElementOptions  

Returns - string

The newly inserted element's Id.

Defined in

Last Updated: 28 April, 2026