sch_modify_component
Modify schematic component properties like position, rotation, or designator. Automatically preserves unpassed metadata to prevent BOM data loss.
Instructions
Modify properties of a schematic component (position, rotation, designator, etc.). Metadata is preserved automatically (bug-1 fix, this fork only): fields you do not pass (supplierId, otherProperty, manufacturer, manufacturerId, supplier, uniqueId) are snapshotted before the write and merged back, so a position-only edit no longer wipes the BOM row. Passing an explicit value (including null) still applies it. Stock EasyEDA does NOT do this — its modify() re-serialises from the property argument alone. LIMITATION: the "document" parameter cannot move a component between schematic pages. Passing a different page's UUID switches the editor but the underlying call fails (undefined.getState_ComponentType); cross-page moves still require a manual UI Cut, switch page, Paste.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | New X coordinate | |
| y | No | New Y coordinate | |
| name | No | New component name | |
| mirror | No | Whether to mirror | |
| document | Yes | Target document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs. | |
| rotation | No | New rotation angle in degrees | |
| supplier | No | Supplier name | |
| uniqueId | No | New unique ID | |
| addIntoBom | No | Whether to include in BOM | |
| addIntoPcb | No | Whether to include in PCB | |
| designator | No | New designator (e.g. "R1", "U2") | |
| supplierId | No | Supplier part number (e.g. LCSC C-number) | |
| instance_id | No | Target EasyEDA instance ID (8-char hex). Required when multiple instances are connected. Omit when only one instance is connected (auto-selected). Use list_instances to see connected instances. | |
| primitiveId | Yes | The component primitive ID | |
| manufacturer | No | Manufacturer name | |
| manufacturerId | No | Manufacturer part number |