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:

import lib

# 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

VCC12R110kGND112233AABBSize: A6Sheet: 1/2Rev: V1Pull down resistorVCC12C1100nGND112233AABBSize: 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.

import lib

# 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

VCC12R110kGNDVCC12R210kGNDVCC12R310kGND112233AABBSize: 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.

import lib

# 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")
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()

VCC12D1green12R11kGNDVCC12D2green12R21kGNDVCC12D3green12R31kGNDVCC12D4green12R41kGNDVCC12D5green12R51kGNDVCC12D6green12R61kGNDVCC12D7green12R71kGNDVCC12D8green12R81kGNDVCC12D9green12R91kGNDVCC12D10green12R101kGNDVCC12D11green12R111kGNDVCC12D12green12R121kGNDVCC12D13green12R131kGNDVCC12D14green12R141kGNDVCC12D15green12R151kGNDVCC12D16green12R161kGND112233AABBSize: A6Sheet: 1/1Rev: V1.2Lots of LEDs