Component parameters
These parameters may determine the value of the component, whether the component is shown as placed or not placed, etc.
place
parameter
Example:
import lib
v5v = supply("5V")
gnd = dgnd()
C1 = cap(100n)
at v5v
wire down 100
add C1
wire down 100
to gnd
C1.place = false
frame:
at v5v
wire down 100
add cap(100n)
..place = false
wire down 100
to gnd
Double dot operator
The double dot operator (..) can be used to modify parameters at the current cursor point. In the example below, pin 1 of C1 is the cursor point before the double dot. This operator can be used to reference components without assigning specific variable names to them.
Example
import lib
frame:
..title = "Setting parameter with variable name"
my_cap = cap(100n)
at my_cap
my_cap.place = false
frame:
..title = "Setting parameter with double dot operator"
at cap(100n)
..place = false
Supported component parameters
Parameter name | Parameter type | Description |
---|---|---|
place | boolean | When true, the component will be shown as placed in the schematic. If set to false, a cross will be displayed on the schematic. |
footprint | string | Path or name of the footprint file/data. |
mpn | string | Manufacturer part number for the component |
value | string/numeric value | For typical passive components (resistors, capacitors and inductors), you may use numeric values like: 10k , 20n , etc. |
refdes | string | Set the reference designator for the component manually. |
Example:
import lib
v5v = supply("5v")
gnd = dgnd()
at v5v
wire down 100
add res(20k)
..value = 30k # Change the value of resistor
..mpn = "res-123456"
wire down 100
to gnd