G-Code output file name format to include Used Filament in meters & grams
 
Notifications
Clear all

G-Code output file name format to include Used Filament in meters & grams  

  RSS
Jb9
 Jb9
(@jb9)
Member
G-Code output file name format to include Used Filament in meters & grams

Sorry if this information already exists elsewhere, but I couldn't find it in any online forums...

The following script entered in "Print Settings/Output options/Output Format Filename" will add the amount of Used Filament in both meters (m) and grams (g) to the G-Code Output Filename:

{input_filename_base}_{print_time}_{digits(used_filament,1,2)}m_{digits(used_filament*3.1415626*filament_diameter[0]*filament_diameter[0]/4*filament_density[0],1,2)}g_{digits(layer_height,1,2)}mm_{temperature[0]}C_{filament_type[0]}_{printer_model}.gcode

(Note: Results verified for PrusaSlicer Version: 2.8.1+win64)

Posted : 18/10/2024 7:32 pm
Neophyl
(@neophyl)
Illustrious Member
RE: G-Code output file name format to include Used Filament in meters & grams

Output format placeholders are listed on the knowledge base here https://help.prusa3d.com/article/list-of-placeholders_205643#output-filename-format-fdm

and macro's for adjusting them such as decimal places etc are listed here https://help.prusa3d.com/article/macros_1775

Theres also the old ways that predate the newer added functions such as digits or round etc which you can read about in a previous thread in this forum https://forum.prusa3d.com/forum/prusaslicer/howto-round-file-output-name-placeholder-total_cost/   

Posted : 18/10/2024 10:06 pm
Share: