set_component_attribute
Updates a specific component attribute in an LTspice .asc schematic. Handles standard slots like SpiceLine, Value, and SpiceModel, and supports arbitrary key=value pairs via SpiceLine.
Instructions
Set a schematic-only component attribute. The standard LTspice slots are Value, Value2, SpiceLine, SpiceLine2, SpiceModel, InstName — anything else is rejected, since LTspice silently ignores unknown SYMATTR keys at netlist time. To set arbitrary KEY=val pairs (e.g. W=10u L=0.5u), pass them as the SpiceLine value.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to .asc schematic | |
| reference | Yes | Component reference (e.g., 'M1', 'R1') | |
| attribute | Yes | Attribute name (e.g., 'SpiceLine', 'SpiceModel', 'Value2') | |
| value | Yes | Attribute value (e.g., 'W=10u L=0.5u') |