Scripting Variables

See scripting for more information.

Common Scripting Variables

nozzle_temp_#

The temperature of the toolhead #. For example: nozzle_temp_0 would be replaced by the temperature setting for Toolhead 0.

bed_temp

The set temperature of your heated build plate.

idle_nozzle_temp

The set idle temperature for your currently active toolhead

retraction_distance

The distance (in mm) that you’ve set for your retractions.

retraction_speed

The speed (in mm/s) that you’ve set for your retractions.

extra_unretract

The extra unretraction that gets added to your normal retraction distance.

unretraction_speed

The speed (in mm/s) that you’ve set for reversing a retraction.

coast_distance

The distance that you’ve set to coast after each set of tracks.

z_hop_distance

The height that you’ve set for a Z-hop.

Speeds

travel_speed

The speed your printer moves while not extruding filament.

default_print_speed

The normal speed your printer moves at while extruding filament.

perimeter_print_speed

The speed your printer moves at while printing the outer-most perimeters of your part.

first_layer_print_speed

The speed your printer will move at while extruding filament on the first layer.

infill_print_speed

The speed your printer will move while printing infill.

skirt_print_speed

The speed your printer will move while printing the skirt.

brim_print_speed

The speed your printer will move while printing the brim.

raft_base_print_speed

The speed your printer will move while printing the bottom of the raft.

raft_top_print_speed

The speed your printer will move while printing the top of the raft.

support_interface_print_speed

The speed your printer will print the top of the support pillars.

support_structure_print_speed

The speed your printer will print the rest of the support pillars.

State Variables

state/X

The expected X-coordinate of your printer.

state/Y

The expected Y-coordinate of your printer.

state/Z

The expected Z-coordinate of your printer.

state/E

The expected E-coordinate of your printer.

state/F

The expected speed of your printer.

state/fan_speed

The expected fan speed of your printer.

state/retraction_amount

Will be set to your retraction_distance whenever a retraction occurs, and set to 0 after an unretraction.

state/z_hop_amount

Will be set to your Z-Hop height after a Z-Hop starts, and set to 0 after the Z-Hop ends.

state/active_toolhead

The expected toolhead being used to print (ie Tool 0)

state/next_toolhead

The expected toolhead that will be used next (only available in the tool change script)

state/next_Z

The Z coordinate of the next layer (only available in the layer change script)

state/active_nozzle_temp

The expected printing temperature for the current nozzle.

state/next_nozzle_temp

The set printing temperature for the next nozzle. This is only updated in a tool change script, and will equal state/active_nozzle_temp everywhere else.

automaticNozzleTemperatureControl

true if the Nozzle Temperature Control box is checked, false otherwise.

automaticBedTemperatureControl

true if the Bed Temperature Control box is checked, false otherwise.

automaticFanControl

true if the Fan Control box is checked, false otherwise.

Uncommon Scripting Variables

All slicing settings are available as scripting variables. The settings below are based on your slicing settings. It is not common to use these in scripts. Documentation here is a work in progress.

Bed Adhesion

brimLayers

See brim layers.

brimTracks

See brim tracks.

generateBrim

true if generate brim is checked, false otherwise.

generateRaft

true if generate raft is checked, false otherwise.

innerEdgesBrim

true if print a brim on inner edges is checked, false otherwise.

raftBaseLayers

See raft base layers.

raftBaseTrackThickness

See raft base layer height.

raftBaseTrackWidth

See raft base track width.

raftGap

See raft gap.

raftOffset

See raft inflation.

raftTopLayers

See raft top layers.

raftTopTrackThickness

See raft top layer height.

raftTopTrackWidth

See raft top track width.

Infill

Nozzle Priming

enablePrimePillar

true if prime pillars is checked, false otherwise.

generateSkirt

true if generate skirt is checked, false otherwise.

skirtOffset

See skirt offset.

skirtTracks

See skirt tracks.

Quality

coastDistance

Same as coast_distance.

enableRetraction

true if retraction is checked, false otherwise.

enableZHop

true if z-hopping is checked, false otherwise.

extrudeRateMultiplier

See extrusion multiplier.

firstSliceHeightMultiplier

See first layer height.

retractionSpeed_mm_per_second

Same as retraction_speed.

retractionDistance

Same as retraction_distance.

trackThickness

See layer height.

trackWidth

See track width.

travelDistanceBeforeRetracting

See retraction threshold.

travelDistanceBeforeZHopping

See z-hop threshold.

unretractionSpeed_mm_per_second

Same as unretraction_speed

zHopDistance

Same as z_hop_distance

Shell

concentricSolidFill

true if concentric solid fill is checked, false otherwise.

enableVaseMode

true if vase mode is checked, false otherwise.

useDifferentHorizontalThickness

true if use horizontal shell thickness is checked, false otherwise.

horizontalShellThickness

See horizontal shell thickness.

shellThickness

See shell thickness.

solidFillAngle

See angle of solid surface fill.

solidFillRotationPerSlice

See solid fill rotation per layer.

spiralPerimeterTracks

trued if spiral perimeter tracks is checked, false otherwise.

Support

generateSupport

true if generate support is checked, false otherwise.

interfaceGap

See z gap between support and model.

maxUnsupportedOverhangAngle

See maximum unsupported overhang angle.

modelSupportXYSeparationDistance

See support xy gap.

numberOfInterfaceLayers

See interface layers.

solidBottomLayer

true if print support raft is checked, false otherwise.

perimeterInterfaceStrategy

See perimeter interface strategy.

solidFillInterfaceStrategy

See solid fill interface strategy.

supportCrosshatchFactor

See support angles per layer.

supportExpansionDistance

See interface xy expansion.

supportFillPercentage

See support fill per iteration.

supportInterfaceFillPercentage

See support interface fill.

Temperatures

buildPlateTemperature

Same as bed_temp.

bridgingFanSpeedPercentage

See bridging fan modifier.

defaultFanSpeedPercentage

See default fan speed.

fanOnDelay

See fan activation delay.

idleNozzleTemperature

Same as idle_nozzle_temp

maxFanSpeed

See max fan speed.

overhangFanSpeedPercentage

See overhang fan modifier.

supportingFanSpeedPercentage

See support fan modifier