obj_batch_modify
Batch-apply multiple filter+set operations to modify many design objects (pins, parameters, components) in a single transaction instead of separate calls.
Instructions
Apply many filter+set operations in ONE IPC round-trip.
PREFER THIS over looping obj_modify whenever you have more
than one change to make, especially when each change targets a
different object (different designator, different pin name,
different sheet). A single obj_batch_modify call touches N objects
in the same Altium transaction; N separate obj_modify calls
cost N LLM round-trips plus N IPC round-trips. The wall-time
difference is typically 10-100x on a multi-item edit.
Use it for: moving multiple pins to specific positions, re-laying component placement, per-sheet title changes, bulk designator rewrites, any workflow where each object gets its own value.
A DESIGNATOR BATCH IS WORTH A NETLIST CHECK AFTERWARDS. There is
no transaction rollback here: if an op fails part way the earlier
ones stay applied, and duplicate designators are not an error
Altium reports. Two parts left sharing D? had their separate
nets MERGED by the netlister, which is silent and survives
File > Revert All (reported on a live project, issue #23).
proj_annotate renumbers a whole project in one operation and
cannot leave duplicates, so prefer it when that is what you
want.
Args: operations: List of operation dicts, each with: - scope: "active_doc" (default), "project", "doc:C:\path\to\file.SchDoc", or "lib_component:NAME" -- a named symbol in the active SchLib. Mixing lib_component scopes across ops edits many library symbols in ONE call, no per-symbol lib_set_current_component round-trip. - object_type: Altium object type (e.g., "ePin", "eParameter", "eSchComponent", "eNetLabel"), or a PCB type such as "eTrackObject", which edits the active board and takes only scope "active_doc" - filter: Pipe-separated filter conditions (e.g., "Designator.Text=U1", "Name=VDD") - set: Pipe-separated property=value assignments (e.g., "Location.X=300|Location.Y=-100|Orientation=2")
Returns:
Dictionary with operations_processed, operations_skipped,
total_matched, and a per-operation results list. Each result
row carries its own matched count plus a note -- an op that
matched nothing reports note="no_objects_matched" instead of
being silently counted as successful.
Example, edit pins across THREE different library symbols in ONE call: obj_batch_modify(operations=[ {"scope": "lib_component:R_0402", "object_type": "ePin", "filter": "Designator=1", "set": "Name=A"}, {"scope": "lib_component:C_0402", "object_type": "ePin", "filter": "Designator=1", "set": "Name=+"}, {"scope": "lib_component:LED_0603", "object_type": "ePin", "filter": "Designator=1", "set": "Name=K"}, ])
Example, reposition 10 pins on a library symbol in ONE call
(vs. 10 separate obj_modify calls, each a full LLM turn):
obj_batch_modify(operations=[
{"scope": "active_doc", "object_type": "ePin",
"filter": "Name=S1",
"set": "Location.X=200|Location.Y=-100|Orientation=2"},
{"scope": "active_doc", "object_type": "ePin",
"filter": "Name=S2",
"set": "Location.X=200|Location.Y=-200|Orientation=2"},
{"scope": "active_doc", "object_type": "ePin",
"filter": "Name=VDD",
"set": "Location.X=800|Location.Y=-100|Orientation=0"},
... # 7 more pins
])
Example, update 4 parameters across every project sheet in ONE call: obj_batch_modify(operations=[ {"scope": "project", "object_type": "eParameter", "filter": "Name=Engineer", "set": "Text=John Smith"}, {"scope": "project", "object_type": "eParameter", "filter": "Name=Revision", "set": "Text=2.0"}, {"scope": "project", "object_type": "eParameter", "filter": "Name=Organization", "set": "Text=Acme Corp"}, {"scope": "project", "object_type": "eParameter", "filter": "Name=CompanyName", "set": "Text=Acme Corp"}, ])
Example, different titles on specific sheets in ONE call: obj_batch_modify(operations=[ {"scope": "doc:C:\path\TopLevel.SchDoc", "object_type": "eParameter", "filter": "Name=Title", "set": "Text=Top Level"}, {"scope": "doc:C:\path\PSU.SchDoc", "object_type": "eParameter", "filter": "Name=Title", "set": "Text=Power Supply"}, ])
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| operations | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||