obj_batch_delete
Deletes matching objects across multiple scopes, types, and filters in one batch call, reducing repeated single-delete operations to one IPC round-trip.
Instructions
Delete matching objects across many scope/type/filter operations.
PREFER THIS over looping obj_delete. Each op is evaluated
in one go, cleaning a mixed set of stale junctions, no-ERCs,
and net labels costs one IPC round-trip instead of N.
Args:
operations: List of delete dicts, each with:
- scope: "active_doc" (default), "project", or
"doc:<absolute_path>".
- object_type: Altium type name (e.g. "eJunction",
"eNoERC", "eWire", or a PCB type such as
"eTrackObject", which deletes from the active board
and takes only scope "active_doc").
- filter: pipe-separated PropName=Value filter
conditions (AND logic), same format as
obj_delete. An EMPTY filter deletes every object
of that type in that scope.
confirm_delete_all: required when any operation has an empty
filter. Same guard obj_delete applies to the single
call, so routing a sweep through the bulk tool does not
get around it.
Example, purge all no-ERCs on a specific sheet and every junction on the project. Both filters are empty, so the confirmation is required: obj_batch_delete(confirm_delete_all=True, operations=[ {"scope": "doc:C:\proj\Power.SchDoc", "object_type": "eNoERC", "filter": ""}, {"scope": "project", "object_type": "eJunction", "filter": ""}, ])
Returns:
Dict with operations_processed, total, total_deleted and
results: one row per operation with its deleted count
and a note saying why it deleted nothing
(unknown_object_type, scope_not_supported, no_objects_matched,
or failed: CODE). Or an error with
operations_processed 0 when a sweep is unconfirmed, in
which case nothing is sent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operations | Yes | ||
| confirm_delete_all | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||