lib_add_pins
Add multiple pins to the current symbol in a single call, replacing one-by-one pin edits and simplifying schematic symbol creation.
Instructions
Add MANY pins to the current symbol in ONE call.
PREFER THIS over adding pins one at a time (there is no singular variant). A 48-pin IC symbol built one pin at a time would be 48 LLM turns; with this tool it's one turn + one PreProcess/PostProcess + one save.
Args:
pins: List of pin dicts, each with:
- designator (str, required)
- name (str, required)
- x, y (int, mils), pin endpoint
- length (int, mils, default 200)
- rotation (int, default 0), 0/90/180/270
- electrical_type (str, default "passive"), one of
input/output/bidirectional/passive/open_collector/
open_emitter/power/hiz/io
- hidden (bool, default False)
- owner_part_id (int, optional). For multi-part
components (e.g. quad op-amp). 1..part_count picks a
specific sub-part; 0 shares the pin across all parts
(typical for V+ / V- power pins on a quad). Omit for
single-part symbols.
- symbol_outer_edge (str, optional). IEEE decoration on
the pin's outer edge. "dot" draws the inversion bubble
of an active-low pin. Omit for none.
- symbol_inner_edge (str, optional). Same, inner edge.
"clock" draws the clock wedge. The two are
independent, so an inverted clock sets both.
Either field also accepts any other TIeeeSymbol name
("schmitt", "open_collector", "active_low_input", ...)
or a bare ordinal.
- show_name / show_designator (bool, optional). Whether
the pin's name and number are DRAWN. Different from
hidden, which hides the pin itself: a resistor shows
both pins and neither label. Omit to leave Altium's
default.
Example, one stage of a dual op-amp (sub-part 1) with shared power pins (sub-part 0): lib_add_pins(pins=[ {"designator": "1", "name": "OUT1", "x": 0, "y": 0, "rotation": 180, "electrical_type": "output", "owner_part_id": 1}, {"designator": "2", "name": "IN1-", "x": 0, "y": 100, "rotation": 180, "electrical_type": "input", "owner_part_id": 1}, {"designator": "3", "name": "IN1+", "x": 0, "y": 200, "rotation": 180, "electrical_type": "input", "owner_part_id": 1}, {"designator": "8", "name": "V+", "x": 0, "y": 400, "rotation": 180, "electrical_type": "power", "owner_part_id": 0}, ])
Returns: Dict with added, failed, total counts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pins | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||