sch_create_component
Creates a schematic component from a full library device object, placing it at specified coordinates. Requires uuid, symbolUuid, footprintUuid, and libraryUuid to avoid validation errors.
Instructions
Create a schematic component from a library device reference. Use lib_search_device or lib_get_device_by_lcsc first to get the component object. IMPORTANT: The component object must include uuid, symbolUuid, footprintUuid, AND libraryUuid — passing only {deviceUuid, libraryUuid} will fail with a validation error. Pass the full object returned by lib_get_device_by_lcsc with libraryUuid added (from lib_get_system_library_uuid).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | X coordinate for placement (X axis points rightward — higher values = further right) | |
| y | Yes | Y coordinate for placement (Y axis points upward — higher values = higher on screen) | |
| mirror | No | Whether to mirror the component | |
| document | Yes | Target document UUID — auto-switches to this document before executing. Get UUIDs from list_instances or editor_get_open_tabs. | |
| rotation | No | Rotation angle in degrees | |
| component | Yes | Full component object including uuid, symbolUuid, footprintUuid, and libraryUuid. Get the base object from lib_get_device_by_lcsc or lib_search_device, then add libraryUuid from lib_get_system_library_uuid. Passing only {deviceUuid, libraryUuid} will fail. | |
| addIntoBom | No | Whether to include in BOM (default true) | |
| addIntoPcb | No | Whether to include in PCB (default true) | |
| 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. | |
| subPartName | No | Sub-part name for multi-part components |