Output file name - (print_time) in hours and minutes instead of days hours minutes.
 
Notifications
Clear all

Output file name - (print_time) in hours and minutes instead of days hours minutes.  

  RSS
vahid
(@vahid)
Active Member
Output file name - (print_time) in hours and minutes instead of days hours minutes.

Hi,

Is it possible to configure the output file name to have in hours and minutes

e.g 44h 51m instead of 2d 20h 51m

formula for it would be something like this ?>>>     {int(print_time/3600)}h_{int(print_time%3600/60)}m

Thanks

 

Opublikowany : 10/12/2025 5:35 am
Sembazuru
(@sembazuru)
Noble Member
RE:

Possibly not. The {print_time} placeholder returns a string that in your example would be "2d20h51m" and I don't see any string manipulation functions in the macros help page. Although, I do see that regular expressions are supported. Maybe using regexp you can extract the values for days, hours, and minutes, add days*24 to the minutes. I barely know what I'm doing with regexp to formulate any experiments and the examples I see in the provided profiles are very basic.

This post was modified 1 day temu by Sembazuru

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Opublikowany : 10/12/2025 5:37 pm
vahid
(@vahid)
Active Member
Topic starter answered:
RE: Output file name - (print_time) in hours and minutes instead of days hours minutes.

ok, is there a way to also assign the same format to the project file name (not the g-code file)

Opublikowany : 11/12/2025 1:55 am
Sembazuru
(@sembazuru)
Noble Member
RE: Output file name - (print_time) in hours and minutes instead of days hours minutes.

I've only ever controlled the project file name with "Save-As" which as far as I know doesn't use PrusaSlicer placeholders being an OS GUI widget thingy.

See my (limited) designs on:
Printables - https://www.printables.com/@Sembazuru
Thingiverse - https://www.thingiverse.com/Sembazuru/designs

Opublikowany : 11/12/2025 6:15 pm
ssmith
(@ssmith)
Estimable Member
RE: Output file name - (print_time) in hours and minutes instead of days hours minutes.

Print settings, expert mode, output options, output filename format is where it is set.The placeholders break out day and hours, but I don't know if you can do math with them.

Opublikowany : 11/12/2025 6:32 pm
Share: