Can one create new user-defined GCode macro variables for Prusa Slicer?
 
Notifications
Clear all

Can one create new user-defined GCode macro variables for Prusa Slicer?  

  RSS
EsotericMaker
(@esotericmaker)
Trusted Member
Can one create new user-defined GCode macro variables for Prusa Slicer?

I have some macros that repeatedly reference a long macro expression. It would be great to set the value to a user-defined macro variable and then just reference the user-defined macro variable.

I saw in the PrusaSlicer documentation that there is a well-defined list of pre-defined macro variables but I want to have a custom variable.

Note: I am talking about macro variables that are evaluated at slicing time, not GCode variables that are evaluated at run/printing time.

 

Thanks

Posted : 05/08/2022 5:51 pm
bobstro
(@bobstro)
Illustrious Member
RE: Can one create new user-defined GCode macro variables for Prusa Slicer?
Posted by: @esotericmaker

[...] I saw in the PrusaSlicer documentation that there is a well-defined list of pre-defined macro variables but I want to have a custom variable.

I spent a lot of time working with PrusaSlicer/Slic3r gcode and processing and I'm unaware of any such capability. I think the closest you'll come is to either:

  • Use a post processing script which will be called by PrusaSlicer after slicing.
  • Create a script that sets up the variables and settings you want, then call PrusaSlicer via the command line interface. This is the approach I used.

I do wish PrusaSlicer had this sort of capability. It would be great to allow one setting to reference another (e.g., maximum layer height = nozzle size * 0.8). You can try making a suggestion on the PrusaSlicer GitHub page where the developers are likely to see it. These pages are mostly for user-user support.

My notes and disclaimers on 3D printing

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

Posted : 05/08/2022 7:06 pm
Neophyl
(@neophyl)
Illustrious Member
RE: Can one create new user-defined GCode macro variables for Prusa Slicer?

Sounds like you might want to try Super Slicer, specifically this version https://github.com/supermerill/SuperSlicer/releases/tag/2.3.57.5   onwards.  

Be aware that while based on Prusa Slicer it is not the same.  The very similarities can be enough to be a gotcha as certain settings behave differently and it allows you to tweak many more settings so its not really for beginners.  

Posted : 05/08/2022 8:33 pm
EsotericMaker
(@esotericmaker)
Trusted Member
Topic starter answered:
RE: Can one create new user-defined GCode macro variables for Prusa Slicer?

 

Posted by: @neophyl

Sounds like you might want to try Super Slicer, specifically this version https://github.com/supermerill/SuperSlicer/releases/tag/2.3.57.5   onwards.  

Be aware that while based on Prusa Slicer it is not the same.  The very similarities can be enough to be a gotcha as certain settings behave differently and it allows you to tweak many more settings so its not really for beginners.  

Thanks but this feature is not do-or-die for me and given that, I would rather stay with Prusa.

Perhaps though the Prusa folks could back port the function...

Posted : 05/08/2022 8:37 pm
Swiss_Cheese
(@swiss_cheese)
Noble Member
RE:

My opinion, just learn how to use Slicer as it is now, you can do anything you want with it.

 

Just depends on how good you are.

 

Good Luck

 

Swiss_Cheese

This post was modified 2 years ago by Swiss_Cheese

The Filament Whisperer

Posted : 05/08/2022 11:48 pm
Share: