Formatting the custom output file name
Hei there,
I wonder if anybody knows about a way to format the custom output file name. I am aware of the template placeholders that I can use to impact the way the output filename of the stl file is generated. That is already good. But I am missing some more minor features
- Formatting template output into e.g. upper or lowercase letters.
It seems that output variables are a mix of uppercase and lowercase letters. The filament type is all uppercase (PLA, PETG), while for example the nozzle is lower case (0.4n), as is the layer height. This generates output filenames with a mixed upper and lower case letter combinations. Unless you actively choose the sorting, on e.g. Linux systems the lower case will always be sorted before the uppercase filenames. One way of partially controlling this is to use the custom part of the project filename to influence the writing. - Replacing/adding/removing parts of variables
I use the date of when a file has been created as the first part of a project filename (m3f), but I structure the types of print differently with an uniq ID. The generated STL output filename does not need the date, but should keep the ID so I know exactly what model I am printing. Currently I cannot automatically remove that part from the template variable with the custom name filter. If I could use e.g. a regex expression within the template variable, I could cut or amend any string to the variable or even replace certain values.So a project filename like 19700101-foobar-01.01.foobar.m3f (01.01 is the id) should generate 01.01-foobar.stl as output filename.
My gutt-feeling tells me we are at the beginning of what is possible with formatting the output filename and this is currently just wishful thinking. But I might have missed this functionality somewhere in the document. Maybe?
RE: Formatting the custom output file name
Hello,
It's a feature request for PrusaSlicer. There are already many bout the filename output here: https://github.com/prusa3d/PrusaSlicer/issues?q=is%3Aissue%20state%3Aopen%20filename%20
Please create a new one on PrusaSlicer GitHub if your request is different. And try to find a developer to make a Pull Request 😉
You can already modify/replace the output file name with a post-processing script.
See: https://help.prusa3d.com/article/post-processing-scripts_283913
Cheerio,
RE: Formatting the custom output file name
Thanks @diem. That seems to solve my issue. I am still struggling somewhere with getting the script with all the parameters to work, but in general it already worked in an earlier testing stage. Thanks for pointing that out to me.