add
add <component>
This adds the given component to the current insertion point (component, pin) and moves the insertion point to the next component pin of the added component.
Example:
import lib
v5v = supply("5V")
at v5v
wire down 100
add R1 = res(10k)
wire down 100
In the above example, after wire down 20
is executed, the insertion point is at the end of the wire
. The add
command creates a new res
component with value of 10k
and connects the wire
to pin 1 of res
. The insertion point is then moved to the next available pin, in this case, it is pin 2 of the newly created res
.
The above example is equivalent to:
import lib
v5v = supply("5V")
at v5v
wire down 100
to R1 = res(10k) pin 1
at R1 pin 2
wire down 100
In this case, the res(10k)
component needs to be assigned to a variable since it has to be referenced later after the to
command.