updateElement Method

Update some properties of an existing element. All parts of elProps are optional other than id. If id is missing, an exception is thrown.

To support clearing a property value, every property name that is present in the elProps object will be updated even if the value is undefined. To keep an individual element property unchanged, it should either be excluded from the elProps parameter or set to its current value.

updateElement<T extends ElementProps>(elProps: Partial<T>): void

@note The values of classFullName and model may not be changed by this method. Further, it will permute the elProps object by adding or overwriting their values to the correct values.

@throws IModelError if unable to update the element.

Parameter Type Description
elProps Partial<T> the properties of the element to update.

Returns - void

Defined in

Last Updated: 17 December, 2024