move_component
Move a placed component, turn it, or both.
Instructions
Move a placed component, turn it, or both.
The symbol and all its fields move together: each field keeps its place relative to the
symbol, rotation included, and keeps its own text angle, so KiCad draws it turning with
the symbol. KiCad's GUI would also re-place auto-placed fields after a turn when its
autoplace preference is on; this tool does not.
Wires, labels, junctions and no-connect flags stay where they are, as with KiCad's own
Move. The result lists every pin whose connections changed (what it left, what it now
meets); reconnect those with wire_pins_to_net or connect_pins.
x and y snap to the 1.27 mm grid when the symbol moves, and the grid point must lie on the
page. Passing the symbol's own position (as list_schematic_components reports it) turns it in
place without snapping, wherever it stands, off the page included. Nothing is written when
nothing would change.
Args:
reference: Reference designator (e.g. "R1")
x: New X position
y: New Y position
rotation: The absolute angle in degrees (None = keep current); a mirrored symbol keeps
its mirror. It is written as KiCad writes it, so it also repairs an angle KiCad
cannot load, such as 45, +90 or none; a call without it refuses one this tool
cannot read as 0, 90, 180 or 270.
schematic_path: Path to .kicad_sch file. Optional; omit to use the configured default.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| rotation | No | ||
| reference | Yes | ||
| schematic_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |