Skip to main content

at

at <component>

Places the component on the canvas and sets the current insertion point at the component. By default, if no pin number is specified, pin 1 is used.

To specify the insertion point at a given pin number, write at <component> pin <pin number>.

Example:

from "std" import *

gnd = dgnd() # define a GND net component

# create a component with 3 pins
my_component = create component:
pins: 3

at my_component # If pin is not specified, pin 1 is used.
wire left 200 down 100
add res(10k)
wire down 100
to gnd

at my_component pin 2 # Move cursor to pin 2 of component
wire right 100 down 100
add cap(100n)
wire down 100
to gnd

Component J1: line 6:1113322J1Component R1: line 11:1R110kline 13:4GNDComponent C1: line 17:1C1100nline 19:4GND

If there is no net at this pin, a unique net will be created.

To display a component on the schematic, it must be called at least once with at <component> or with to <component>. Otherwise, the component will not be visible in the schematic.

Example:

from "std" import *

supply1 = supply("1.1V")
supply2 = supply("2.2V")

at supply1 # visible

# supply2 is not visible
line 6:11.1V

Example 2:

from "std" import *

supply1 = supply("1.1V")
supply2 = supply("2.2V")

at supply1 # visible
at supply2 # supply2 is visible
line 6:11.1Vline 7:12.2V

point reference

at can also position the cursor at a named point defined by point "name":

  • at "point_name" — move cursor to the named point defined by point "point_name"
  • at some_var — move cursor to the named point stored in a variable (bare variable form, where some_var holds a point name string)
  • at array_get(names, i) — move cursor to a dynamically-selected named point from an array

Example:

from "std" import *

gnd = dgnd()
names = []
gnds = []

at v5 = supply("5V")
wire down 100

for i in range(0, 5):
point "hello_" + i
array_push(names, "hello_" + i)

if i < 4:
wire right 300

for i in range(0, 5):

# dynamic reference via array_get
at array_get(names, i)

wire down 100
add cap(100n)

tmp_name = "gnd_" + i

# bare variable form
point tmp_name

array_push(gnds, tmp_name)

for i in range(0, 5):
at gnd
wire up 100

# bare variable referencing
to array_get(gnds, i)
line 7:15Vline 20:5line 20:5line 20:5line 20:5line 20:5Component C1_5: line 23:5C1_5100nline 37:8line 33:5GNDComponent C1_4: line 23:5C1_4100nline 37:8line 33:5GNDComponent C1_3: line 23:5C1_3100nline 37:8line 33:5GNDComponent C1_2: line 23:5C1_2100nline 37:8line 33:5GNDComponent C1_1: line 23:5C1_1100nline 37:8line 33:5GND