Question about adjusting filename output
 
Notifications
Clear all

Question about adjusting filename output  

  RSS
jaswalt
(@jaswalt)
Active Member
Question about adjusting filename output

I have just scratched the surface of g-code manipulation and I have a question.  Is there a way to get the filename of the sliced g-code filename to NOT print [underscores]?  I would love to simply have a space between words in a multi-word filename.

I also have a different question in the same direction.  I have the 'filament used' value in the filename.  That part was relatively easy considering I have zero programming experience for anything after Basic.  Not visual basic or any other type of basic, but simply "Basic 2.0".  But the g-code for slic3r seemed intuitive enough.  My question is, is there a way to limit the decimal places of the 'filament used' to just 2 digits after the decimal rather than the 4 digits that it defaults to?  

Is there a programming language that would be good to learn that would help me understand the g-code better.  I am current studying Arduino, which I think is Java based.  Is there anything in that that can help me learn this?

Any help would be great.

Opublikowany : 25/01/2022 11:30 am
BogdanH
(@bogdanh)
Honorable Member
RE: Question about adjusting filename output

In PrusaSlicer (use Expert mode), go to tab Print Settings, click Output options (on left side) and you'll see a line called Output filename format. There you replace underscore characters with blanks (spaces).. and that's it.

[Mini+] [MK3S+BEAR]

Opublikowany : 27/01/2022 3:29 pm
jaswalt
(@jaswalt)
Active Member
Topic starter answered:
RE: Question about adjusting filename output

I kind of feel stupid for asking that now that I have seen the answer.  I thought "it can't be that easy!"  I appreciate the quick response.

Opublikowany : 27/01/2022 8:43 pm
Neophyl
(@neophyl)
Illustrious Member
RE: Question about adjusting filename output

jaswalt you can do the decimals in the output name too.  The following is something I picked up awhile ago when I was asking about getting rid of the decimals too.  Can be used on many of the place holders.

Easy fix: use "...{int(total_weight)}g..."
For more decimals use "...{int((total_weight*10.0))/(10.0)}g..." or replace the "10.0" with any order of magnitude you like.
And yes, the amount of brackets look redundant, but they are important.

I came to the conclusion that for me as long as the weight was close and slightly above then it didnt matter when weighing filament for working out if theres enough left.  So I now use
{input_filename_base}_{layer_height}mm_{filament_type[0]}_{printer_model}_{print_time}_{int(total_weight)+1}g.gcode

which just adds 1g to it anyway.  

 

Opublikowany : 28/01/2022 7:24 am
Share: