deleteElements Method @beta

Deprecated  in 5.1.9 - might be removed in next major version. Use EditTxn.deleteElements instead, within an explicit EditTxn scope (or via withEditTxn). See EditTxn documentation for migration help.

Delete multiple elements from the iModel.

deleteElements(ids: Id64Array, deleteOptions?: BulkDeleteElementsArgs): BulkDeleteElementsResult

@returns A result object containing information about the deletion operation success and the element ids that failed to delete (if any).

@throws ITwinError if any of the supplied ids are not well-formed/valid Id64Strings.

Parameter Type Description
ids Id64Array The ids of the elements to delete. All ids must be well-formed and valid Id64Strings.
deleteOptions BulkDeleteElementsArgs Options for the delete operation.

Returns - BulkDeleteElementsResult

A result object containing information about the deletion operation success and the element ids that failed to delete (if any).

Defined in

Last Updated: 05 September, 2026