Skip to main content

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

5V12C1100nGND5V12C2100nGND

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

12C1100n12C2100nSetting parameter with variable nameSetting parameter with double dot operator

Supported component parameters

Parameter nameParameter typeDescription
placebooleanWhen true, the component will be shown as placed in the schematic. If set to false, a cross will be displayed on the schematic.
footprintstringPath or name of the footprint file/data.
mpnstringManufacturer part number for the component
valuestring/numeric valueFor typical passive components (resistors, capacitors and inductors), you may use numeric values like: 10k, 20n, etc.
refdesstringSet 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

5v12R130kGND