Replace Instance Lib Ids
replace_instance_lib_idsReplace lib_id references in schematic symbol instances using an explicit old-to-new mapping, enabling library migration (e.g., from eagle_import to curated symbols). Handles mirror-variant suffixes automatically.
Instructions
Replace lib_id references in schematic symbol instances per an explicit old-to-new mapping — the mechanical layer of a library migration (e.g. eagle_import symbols to curated library symbols). Mirror-variant suffixes (__m0/__m90/__m180/__m270) get automatic angle correction; each needs its own mapping entry. Only instances are rewritten; lib_symbols is preserved (use update_symbol_from_library to refresh definitions afterwards).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mapping | Yes | Map of old full lib_id to new full lib_id, e.g. {"eagle_import:C_100n": "Device:C"}. Values are used verbatim. | |
| schematicPath | Yes | Path to the .kicad_sch file | |
| sourceLibrary | No | Library prefix whose instances are candidates | eagle_import |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |