insertAspect Method

Insert a new aspect into the iModel.

insertAspect(aspectProps: ElementAspectProps): string

@returns The newly inserted aspect Id.

@throws EditTxnError if this EditTxn is not active.

@throws IModelError if insertion fails.

Parameter Type Description
aspectProps ElementAspectProps The properties of the new aspect.

Returns - string

The newly inserted aspect Id.

Defined in

Last Updated: 28 April, 2026