feat: add unit parameter to add_schematic_component for multi-unit symbols
Allows placing a specific unit (A=1, B=2, C=3, …) of a multi-unit KiCad symbol rather than always defaulting to unit 1. Required for quad optocouplers, dual op-amps, and other multi-unit parts where each channel must be placed independently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -717,6 +717,7 @@ class KiCADInterface:
|
||||
footprint = component.get("footprint", "")
|
||||
x = component.get("x", 0)
|
||||
y = component.get("y", 0)
|
||||
unit = component.get("unit", 1)
|
||||
|
||||
# Derive project path from schematic path for project-local library resolution
|
||||
schematic_file = Path(schematic_path)
|
||||
@@ -732,6 +733,7 @@ class KiCADInterface:
|
||||
footprint=footprint,
|
||||
x=x,
|
||||
y=y,
|
||||
unit=unit,
|
||||
project_path=derived_project_path,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user