Output filename format
Hello, i was wondering if there was an updated list of the output filename format placeholders for prusa slicer? For exemple the estimated printing time.
Also would it be possible to move this option out of print settings, it's more a general preference?
RE: Output filename format
Well i answered my question, probably did a typo the first time i tried it... For the others wondering it's {print_time} easy peasy
RE: Output filename format
Hello,
I will be good to have a list of all variables available for the file name on prusa slicer. I don't retrieve anywhere this information.
RE: Output filename format
There is this, but it needs an update.
https://github.com/prusa3d/PrusaSlicer/wiki/Slic3r-placeholders-(a-copy-of-the-mauk.cc-page)
Bill
Tagaytay City, Philippines
Founder member of Philippines Prusa Printer Owners FB Group
Sponsor Pillars of God Academy in Bacoor
RE: Output filename format
Hover over any variable in P.Slicer and it shows the placeholder name.
RE: Output filename format
Well i answered my question, probably did a typo the first time i tried it... For the others wondering it's {print_time} easy peasy
That's a somewhat recent addition. I wrote a post-processing script to extract the time and rename the file with earlier versions of Slic3rPE. Interesting to note that, unlike other placeholders, this one is NOT in the gcode file. I'd forgotten that Team Prusa added this in somewhat recently.
and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan
RE: Output filename format
Thanks to all for your help.
RE: Output filename format
It seems like the code for translating the variable names is buggy. For example, if you have the {filament_type[0]} and your print is set to use PETG, you still get PLA as the filament type in the filename. It is as if it is using the default value. If you choose [1] or [2] [3] samething, you get PLA for all of them despite actual filament settings... Okay, figured this out, it is using the value for the first extruder, even if the objects printed are using a different extruder. So even if you use {filament_type[4]} and your fourth filament/extruder is set to PETG and the whole print in fact is set to PETG, if you have PLA in the first filament slot, you get PLA in the file name output.
RE: Output filename format
HI, I have specific question so it seems. I want to change the defaul output format to include print time, but I can not find any setting to save my format as default! However, at work, the format includes print time by default! The prusaslicer versions are same..Please help.
RE: Output filename format
Try [print_time]. There is a full list of available placeholders here.
and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan
RE: Output filename format
@shatter
The slicer versions may be the same but the profiles are updated and downloaded separately. You have to have the option enabled and it has to be able to access them from whatever server Prusa is using as it’s done from within Slicer itself. It usually checks on startup if the option is turned on.
RE: Output filename format
@neophyl
I am stupid! Yes, that worked. Thank you!
RE: Output filename format
well, its not a bad idea, but i see some possible problems there, like getting the file name too large for some boards /systems to handle, I had seen this a lot on the past with some older cnc machines and even see it today when I extract stuff with too long names.
RE: Output filename format
well, its not a bad idea, but i see some possible problems there, like getting the file name too large for some boards /systems to handle, I had seen this a lot on the past with some older cnc machines and even see it today when I extract stuff with too long names.
RE: Output filename format
Hello,
i want to include the nozzle diameter in the file name. I tried the "nozzle_diameter" from the link, but get an error.
"Failed processing of the output_filename_format template.
Parsing error at line 1: Referencing a vector variable when scalar is expected
{input_filename_base}_{layer_height}mm_{filament_type[0]}_{nozzle_diameter}_{print_time}.gcode
^"
Is there a fix for it?
Also my filament is PLA+ and in the filename the "+" ist gone. Is there a fix for it or do i have to use "PLAplus" as name?
Thank you in advance!
RE: Output filename format
@b-schmitt-einkaufen
You have to use {nozzle_diameter[0]}. Because its possible to have multiple extruders then any placeholder that is taken from an extruder setting needs the array value. [0] for extruder zero, [1] for extruder 1 etc. Numbers start from zero and not one which is normal for an array in code even though they use Extruder 1 and Extruder 2 for the normal naming, which confuses things for those not used to programming.
You cant use + in standard file naming schemes, same with most of the other special characters like % or . as they mean things to the file system. For example I *could* save a gcode file with % in it and it doesnt cause my windws pc a problem. But once I send it to my flashair card in my MK3 printer which uses webdav as a file system then the gcode file is no longer accessible from my pc anymore, in fact the entire folder that the file was placed in becomes inaccessible. So you have to be careful when naming files. Its best to stick to alphanumerics only A-Z and 0-9 with _ underscores to separate sections as that combination is the one least likely to cause issues.
RE: Output filename format
Try square brackets:
[nozzle_diameter]
PrusaSlicer uses square brackets ([]) unless evaluating a condition in curly braces ({}).
and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan
RE: Output filename format
@neophyl is right, it's an array. I use the following custom output format:
[input_filename_base]_{printer_model}_{nozzle_diameter[0]}n_{filament_type[0]}_[temperature]C_[layer_height]mm_[fill_density]_[print_time].gcode
As far as the plus sign is concerned. I do use "PLA+" and don't see a problem with that (on Windows).
Formerly known on this forum as @fuchsr -- until all hell broke loose with the forum software...
RE: Output filename format
Thank you all a lot for the quick replies!
One more question. Is it possible to set a new output format for all profiles? So that it is this way everytime i start prusa slicer?
RE: Output filename format
I use this string, if it is useful for you:
[input_filename_base]_[normal_print_time]_[total_weight]g_[total_cost]€.gcode
"One more question. Is it possible to set a new output format for all profiles? So that it is this way everytime i start prusa slicer?"
I am sorry but you have to add it to one by one to all your profiles profiles, and save them with that modification.
(The System preset profiles can not be modified)