EN
  • Čeština
  • Español
  • Italiano
  • Deutsch
  • Polski
  • Français
Login

List of placeholders

Relevant for:
Last updated a month ago
This article is also available in following languages: 
CSDEESFRITPL

This is a list of variables available in custom G-Code macro language in PrusaSlicer. The macro language is described in detail in a separate page.

Placeholders for configuration options

Each configuration option can be used in all of your custom G-Codes and output filename template. The identifier of the respective placeholder is shown in a tooltip when you hover the config option in parameter tabs:

That is, using {layer_height} in a custom G-Code would expand into 0.15.

Placeholders available in all custom G-Codes

There are additional placeholders available in all custom G-Codes:

current_extruder
current_object_idx
day
filament_preset
first_layer_print_convex_hull
first_layer_print_max
first_layer_print_min
first_layer_print_size
has_single_extruder_multi_material_priming
has_wipe_tower
hour
initial_extruder
initial_tool
input_filename
input_filename_base
minute
month
num_instances
num_objects
physical_printer_preset
print_bed_max
print_bed_min
print_bed_size
print_preset
printer_preset
scale
second
timestamp
total_layer_count
total_toolchanges
year

 

Custom G-Code specific placeholders

There are extra placeholders only available in certain custom G-Codes. See the table below for an overview.

 ToolchangeBefore layerAfter LayerFilament StartFilament EndEnd
next_extruder
previous_extruder
toolchange_z
max_layer_zfrom ver. 2.6from ver. 2.6from ver. 2.6
layer_numfrom ver. 2.6
layer_zfrom ver. 2.6
filament_extruder_idfrom ver. 2.6

 

 

Output filename format FDM

The macro language can be used in Output filename format field available in Print Settings -> Output options. In this context you can use all the configuration placeholders plus the following:

day
extruded_volume
filament_preset
hour
initial_extruder
initial_filament_type
initial_tool
input_filename
input_filename_base
minute
month
normal_print_time
num_extruders
num_instances
num_objects
num_printing_extruders
physical_printer_preset
print_preset
print_time
printer_preset
printing_filament_types
scale
second
silent_print_time
timestamp
total_cost
total_toolchanges
total_weight
total_wipe_tower_cost
total_wipe_tower_filament
used_filament
version
year

 

Output filename format SLA

You can use all configuration options placeholders plus the following:

day
hour
input_filename
input_filename_base
minute
month
num_instances
num_objects
objects_used_material
print_time
scale
second
support_used_material
timestamp
total_cost
total_weight
version
year

Was this article helpful?

Comments

Please sign in before adding a comment.
0
Still have questions?

Still have questions?

If you have a question about something that isn't covered here, check out our additional resources.
And if that doesn't do the trick, you can send an inquiry to info@prusa3d.com or through the button below.