@oozebot This is fantastic! Yeah its not optimal, but I'll take progress over perfection.
Thank you for this!
@oozebot This is fantastic! Yeah its not optimal, but I'll take progress over perfection.
Thank you for this!
I have this issue too, but my work around is I have sub directories in the sys directory that have their own config.g and other sys files. When I want to switch configs, I have macros that run M505 "0:\sys\config1" or M505 "0:\sys\config2", etc. I have global variables that get reused in each, like probeLocation, but it gets redifined depending on which config.g is run.
You will also have to run this code block to check if the variable already exists and act accordingly... yeah, yeah I know, the elif is not necessary in this case, I just like being as explicit as possible
edit: converted code from text to embedded code block
;create local variable that is stored until the existence of a global variable is checked
var probeLocationX = XX.XX
var probeLocationY = YY.YY
var probeLocationZ = ZZ.ZZ
if exists(global.probeLocationX) == true
set global.probeLocationX = {var.probeLocationX}
set global.probeLocationY = {var.probeLocationY}
set global.probeLocationZ = {var.probeLocationZ}
elif exists(global.probeLocationX) == false
global probeLocationX = {var.probeLocationX}
global probeLocationY = {var.probeLocationY}
global probeLocationZ = {var.probeLocationZ}
Yes! This would be very useful. Or at a minimum just have an option that has "yes", "no" and "cancel". "Yes" and "No" would return a boolean, that could be checked with an if statement, and cancel would kill the macro like it currently does. I'm not sure how or where to store the boolean. Having the ability to type a value into a UI prompt would extremely useful as well.