Edit schematic sheet
edit_schematicEdit Altium schematic sheets: move or rotate components, update parameters, and add text, wires, buses, and power ports.
Instructions
Purpose: Edit one schematic sheet (.SchDoc) via a single tool with multiple modes (action).
When to use: Move or rotate symbols, set parameters, place components, add text/net labels, wires, buses, bus entries. After editing, call get_schematic_data on the same sheet to verify.
Sheet targeting (required): Provide schematic_full_path (absolute .SchDoc, preferred) OR schematic_sheet_file_name (file name only, e.g. Sheet1.SchDoc) with project_full_path or Altium focused project.
Common parameters: action (string), schematic_full_path?, project_full_path?, schematic_sheet_file_name?
Actions:
set_component_transform — designator (required); optional x_mils, y_mils, rotation_deg (at least one of position/rotation must be set). Coordinates in mils; rotation in degrees (snapped to 0/90/180/270).
set_component_parameters — designator (required); parameter_names[] and parameter_values[] (same length; updates existing parameters or adds new ones).
place_component — lib_reference, designator, x_mils, y_mils, rotation_deg (optional, default 0); sch_library_path (absolute .SchLib) strongly required for a real symbol. Without sch_library_path the bridge only creates an empty schematic component shell (designator + LibReference, no library graphics—pins/body do not appear). With sch_library_path the bridge uses PlaceSchComponent from that file. All coordinates are sheet mils in the same space as get_schematic_data schematic_x/schematic_y; place inside the white drawing area (use existing objects on the sheet as reference, typically thousands of mils, not pixel-scale values).
add_text — text, x_mils, y_mils (free string on sheet).
add_net_label — net_name, x_mils, y_mils; optional rotation_deg.
place_net_label — alias of add_net_label (response echoes the action you sent).
add_wire — wire_points_csv: comma-separated mils pairs for orthogonal polyline segments, e.g. "0,0,1000,0,1000,500" creates (0,0)-(1000,0) and (1000,0)-(1000,500).
place_wire — alias of add_wire.
add_bus — same wire_points_csv format as add_wire; creates bus segments (eBus) instead of wires.
add_bus_entry — wire_points_csv must be exactly four numbers x1,y1,x2,y2 (mils) for one bus-entry segment (eBusEntry).
place_power_port — power_port_style (required): circle | arrow | bar | wave | gnd_power | power_ground | gnd_signal | signal_ground | gnd_earth | earth; x_mils, y_mils; optional net_name (defaults by style: GND for ground styles, VCC for supply styles), rotation_deg, show_net_name (default true).
place_gnd — same coordinates; optional power_port_style (default gnd_power in bridge), optional net_name (default GND if empty).
place_vcc — same coordinates; optional power_port_style (default arrow in bridge), optional net_name (default VCC if empty).
Returns: Bridge JSON result object with action, sheet, details (mode-specific). On Delphi-side failure, error text may start with ERROR: (e.g. COMPONENT_NOT_FOUND, SHEET_REQUIRED).
Prerequisites: Target .SchDoc must belong to an open project. Bridge command schematic_edit.
Notes: Does not auto-save the document unless the user saves in Altium. API behavior may vary slightly by AD major version. Wires and buses use straight segments (Location–Corner per segment). Delphi errors for buses include FACTORY_BUS_FAILED, BUS_POINTS_CSV_REQUIRED, FACTORY_BUS_ENTRY_FAILED, BUS_ENTRY_POINTS_NEED_EXACTLY_FOUR_NUMBERS, BUS_ENTRY_POINTS_CSV_REQUIRED. Power ports (ISch_PowerObject): POWER_PORT_STYLE_REQUIRED, POWER_PORT_STYLE_INVALID, FACTORY_POWER_OBJECT_FAILED, X_Y_MILS_REQUIRED.
Debugging / freezes: If the Altium Script IDE has a breakpoint set in Altium_API or schematic_edit (or Run with debugger), the script stops before writing response.json and the MCP client will see TIMEOUT. Clear all breakpoints, use Run without debugging, or press Continue/Stop Debugging in Altium. After a TIMEOUT, if no later tool runs, delete .bridge.lock in the MCP workspace folder so the next call is not blocked by the lock wait.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | ||
| action | Yes | ||
| x_mils | No | ||
| y_mils | No | ||
| net_name | No | ||
| designator | No | ||
| rotation_deg | No | ||
| lib_reference | No | ||
| show_net_name | No | ||
| parameter_names | No | ||
| wire_points_csv | No | ||
| parameter_values | No | ||
| power_port_style | No | ||
| sch_library_path | No | ||
| project_full_path | No | ||
| schematic_full_path | No | ||
| schematic_sheet_file_name | No |