Skip to main content

Sheets

The sheet keyword can be used to group circuits into different sheets based on standard paper sizes. At the start of the script, specify the type of sheet with the following code: document.sheet_type = <sheet_type_function>().

The standard library supports the following sheet_type_functions: sheet_A1(), sheet_A2().. until sheet_A6()

Example:

from "std" import *

# Set default sheet type to A6
document.sheet_type = sheet_A6()

vcc = supply("VCC")
gnd = dgnd()

# Sheet created with sheet A6 graphic
sheet:
..title = "Pull down resistor"
at vcc
wire down 100
add res(10k)
wire down 100
to gnd

# Another sheet with sheet A6 graphic
sheet:
..title = "Decoupling capacitor"
at vcc
wire down 100
add cap(100n)
wire down 100
to gnd
line 12:5VCCComponent R1: line 14:5R110kline 16:8GND112233AABBSize: A6Sheet: 1/2Rev: V1Pull down resistorline 21:5VCCComponent C1: line 23:5C1100nline 25:8GND112233AABBSize: A6Sheet: 2/2Rev: V1Decoupling capacitor

Sheet properties

Supports the title and direction property, similar to the frame command.

Additionally, the revision property is also available. This appears in the sheet title block and can be used to indicate the version of the schematic design.

from "std" import *

# Set default sheet type to A6
document.sheet_type = sheet_A6()

vcc = supply("VCC")
gnd = dgnd()

# Sheet created with sheet A6 graphic
sheet:
..title = "My schematic"
..direction = "column"
..revision = "V1.2"

at vcc
wire down 100
add res(10k)
wire down 100
to gnd

at vcc
wire down 100
add res(10k)
wire down 100
to gnd

at vcc
wire down 100
add res(10k)
wire down 100
to gnd
line 15:5VCCComponent R1: line 17:5R110kline 19:8GNDline 21:5VCCComponent R2: line 23:5R210kline 25:8GNDline 27:5VCCComponent R3: line 29:5R310kline 31:8GND112233AABBSize: A6Sheet: 1/1Rev: V1.2My schematic

Sheet layout

Circuits placed within a sheet will try to stay within the sheet area and will avoid being placed over the title block.

from "std" import *

# Set default sheet type to A6
document.sheet_type = sheet_A6()

vcc = supply("VCC")
gnd = dgnd()

def led_circuit():
at vcc
wire right 200
add led("green") pin 2
wire right 100
add res(1k)
wire right 100
to gnd

# Sheet created with sheet A6 graphic
sheet:
..title = "Lots of LEDs"
..revision = "V1.2"

for i in range(0, 16):
led_circuit()
line 10:5VCCComponent D1_1_1: line 12:512D1_1_1greenComponent R1_1_1: line 14:5R1_1_11kline 16:8GNDline 10:5VCCComponent D1_2_1: line 12:512D1_2_1greenComponent R1_2_1: line 14:5R1_2_11kline 16:8GNDline 10:5VCCComponent D1_3_1: line 12:512D1_3_1greenComponent R1_3_1: line 14:5R1_3_11kline 16:8GNDline 10:5VCCComponent D1_4_1: line 12:512D1_4_1greenComponent R1_4_1: line 14:5R1_4_11kline 16:8GNDline 10:5VCCComponent D1_5_1: line 12:512D1_5_1greenComponent R1_5_1: line 14:5R1_5_11kline 16:8GNDline 10:5VCCComponent D1_6_1: line 12:512D1_6_1greenComponent R1_6_1: line 14:5R1_6_11kline 16:8GNDline 10:5VCCComponent D1_7_1: line 12:512D1_7_1greenComponent R1_7_1: line 14:5R1_7_11kline 16:8GNDline 10:5VCCComponent D1_8_1: line 12:512D1_8_1greenComponent R1_8_1: line 14:5R1_8_11kline 16:8GNDline 10:5VCCComponent D1_9_1: line 12:512D1_9_1greenComponent R1_9_1: line 14:5R1_9_11kline 16:8GNDline 10:5VCCComponent D1_10_1: line 12:512D1_10_1greenComponent R1_10_1: line 14:5R1_10_11kline 16:8GNDline 10:5VCCComponent D1_11_1: line 12:512D1_11_1greenComponent R1_11_1: line 14:5R1_11_11kline 16:8GNDline 10:5VCCComponent D1_12_1: line 12:512D1_12_1greenComponent R1_12_1: line 14:5R1_12_11kline 16:8GNDline 10:5VCCComponent D1_13_1: line 12:512D1_13_1greenComponent R1_13_1: line 14:5R1_13_11kline 16:8GNDline 10:5VCCComponent D1_14_1: line 12:512D1_14_1greenComponent R1_14_1: line 14:5R1_14_11kline 16:8GNDline 10:5VCCComponent D1_15_1: line 12:512D1_15_1greenComponent R1_15_1: line 14:5R1_15_11kline 16:8GNDline 10:5VCCComponent D1_16_1: line 12:512D1_16_1greenComponent R1_16_1: line 14:5R1_16_11kline 16:8GND112233AABBSize: A6Sheet: 1/1Rev: V1.2Lots of LEDs