insertAspect Method

Insert a new ElementAspect into the iModel.

insertAspect(aspectProps: ElementAspectProps): string

throws IModelError if unable to insert the ElementAspect.

note Aspect Ids may collide with element Ids, so don't put both in a container like Set or Map use EntityReference for that instead.

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

Returns - string

the id of the newly inserted aspect.

Defined in

Last Updated: 20 June, 2023