User Configurable Script Variables
Posted: Fri Mar 07, 2025 6:23 pm
I would like to see user configurable script variables with UI support for creating user variables.
For example, in one script I have this:
The cooldown temperature in that script is hardcoded and works for a specific brand of PETG. It will not work well for PVA. If I use PVA I need to modify that value in the script. So I need 2 different scripts now, one for PETG and one for PVA.
I would like to use this instead in my script:
Then in the UI, there would be a list of user variables that scripts would reference. This could simply be a text box with user variables like this:
Then you could have a Auto-Configure you can setup that applies to the user variable text box. Much like how you can already do this with the Script text boxes. There would just be 1 additional text box devoted to script variables.
UI-wise, this is a minor change.
Script wise, it's basically a text replace. Quite simple. Anywhere where [my_variable_extruder_idle_temp] is found in a script, get's replaced with it's value when the G-Code is created.
Something like this is simple to implement, and will extend script functionality quite a bit. Especially if we get IF THEN ELSE statements added to scripts.
This allows you to setup Auto-Configure for features that your 3D printer supports, which Simplify3D doesn't support. For example, my QIDI I-Fast supports setting jerk values such as "M205 X8 Y8". This is not supported by Simplify3D, and is something I like to modify sometimes to get different quality prints. Currently I have to manually edit my Starting script if I want to change these values. It would be much nicer to have an Auto-Configure I can create that modifies the values I use in my Starting script.
For example, in one script I have this:
Code: Select all
M104 S170 T0 ; Turn down extruder to prevent oozing.I would like to use this instead in my script:
Code: Select all
M104 S[my_extruder_idle_temp] T0 ; Turn down extruder to prevent oozing.Code: Select all
my_extruder_idle_temp=170
my_travel_acceleration=500
my_max_jerk_x = 8
my_max_jerk_y = 8
UI-wise, this is a minor change.
Script wise, it's basically a text replace. Quite simple. Anywhere where [my_variable_extruder_idle_temp] is found in a script, get's replaced with it's value when the G-Code is created.
Something like this is simple to implement, and will extend script functionality quite a bit. Especially if we get IF THEN ELSE statements added to scripts.
This allows you to setup Auto-Configure for features that your 3D printer supports, which Simplify3D doesn't support. For example, my QIDI I-Fast supports setting jerk values such as "M205 X8 Y8". This is not supported by Simplify3D, and is something I like to modify sometimes to get different quality prints. Currently I have to manually edit my Starting script if I want to change these values. It would be much nicer to have an Auto-Configure I can create that modifies the values I use in my Starting script.