obj_delete
Find and delete schematic or PCB objects by type and property filter, with a required confirmation when the filter is empty to prevent deleting every object of that type.
Instructions
Find and delete schematic or PCB objects.
For several scope/type/filter sets at once, use obj_batch_delete
, one IPC round-trip vs one LLM turn per delete.
A PCB type (eTrackObject, eViaObject, ...) deletes from the active
board, and matches a footprint's own primitives and a polygon's
hatching too unless the filter says "InComponent=false" and
"InPolygon=false". To take up routing, pcb_unroute does that
with the right exclusions built in.
Args:
object_type: Altium object type constant (see obj_query)
scope: "active_doc", "project", "doc:PATH", or
"lib_component:NAME" (a named symbol in the active SchLib).
A PCB type takes only "active_doc".
filter: Pipe-separated property=value conditions (AND logic).
WARNING: empty filter deletes ALL objects of the type.
confirm_delete_all: Must be True to delete all objects when filter is empty.
A filter that is not Name=Value pairs (an Altium query expression
such as OnLayer('TopLayer') Or ..., or a bare name) is refused,
and nothing is deleted.
Returns: Dictionary with "matched" count (number deleted)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | active_doc | |
| filter | No | ||
| object_type | Yes | ||
| confirm_delete_all | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||