lib_move_components
Moves matching schematic library components, including symbols, parameters, and models, between .SchLib files in bulk by explicit names or regex, with optional source deletion.
Instructions
Move matching components (symbol + params + models) between SchLibs.
Bulk analog of lib_copy_component: copies every matching component from source_schlib to dest_schlib (Replicate carries the whole symbol, its parameters and its models) in one pass, then removes them from source unless delete_from_source is False. This is the piece that makes a full library split a single call.
Provide either names (explicit LibReferences) or name_regex (matched against the source's component names). With names it is one IPC call; with name_regex the source component list is fetched first to resolve the matches, then the move runs. A component already present in dest is skipped unless overwrite=True.
Args:
source_schlib: source .SchLib path.
dest_schlib: destination .SchLib path.
names: explicit list of component LibReferences to move.
name_regex: regex matched against source component names when names
is not given.
delete_from_source: remove moved components from source (default True).
overwrite: replace a same-named component already in dest.
dry_run: resolve the selection and report it WITHOUT moving
anything. Worth doing whenever name_regex is used: the
pattern is applied with search, not a full match, so
R selects every name containing an R, and the default
is to delete them from the source afterwards.
Returns: {"success": true, "moved": N, "skipped": N, "failed": N}, or in dry-run {"dry_run", "resolved", "count", ...} with nothing sent to the bridge.
A failed copy does not delete: the handler counts it in failed
and moves on, so the source keeps it. What is NOT recoverable is
overwrite=True replacing a different component of the same
name in the destination, which is why dry_run reports both flags.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | No | ||
| dry_run | No | ||
| overwrite | No | ||
| name_regex | No | ||
| dest_schlib | Yes | ||
| source_schlib | Yes | ||
| delete_from_source | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||