lib_set_current_component
Sets a named component as the active SchLib selection so bulk pin, rectangle, or parameter edits target that component instead of the last UI-selected one.
Instructions
Make a named component the editor's current selection in the active SchLib.
Required before bulk-editing a specific component's pins,
rectangle, or parameters via obj_modify / obj_batch_modify
on a SchLib. The asymmetry it fixes: lib_get_component_details
is a read-only fetch and does NOT update the editor's current
component, so subsequent obj_modify on the SchLib's
ePin / eRectangle / eParameter iterators silently hits whatever
component was last UI-selected -- usually NOT the one you just
read.
Use this between switching components: lib_set_current_component("MyIC") modify_objects("ePin", scope="active_doc", filter="Location.X=200", set="Orientation=2") lib_set_current_component("MyOtherPart") modify_objects("ePin", scope="active_doc", filter="Location.X=200", set="Orientation=2")
Args: component_name: Component name (LibRef) in the active SchLib.
Returns:
Dict with success + name, or an error if no SchLib
is active or the component name isn't found in it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| component_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||