Page 1 of 1
IF commands
Posted: Wed Aug 22, 2018 10:59 am
by rajaakahel
Would be VERY useful to allow IF commands in Start Script and Ending Script.
Also to add another IF commands like {IF CurrentTOOL=0}
I'm wondering what IF commands are already available? and is there a way to allow them in Start Script and Ending Script?
Re: IF commands
Posted: Sun Sep 09, 2018 6:55 am
by Umake
+1
I really would like to see IF-THEN-ELSE as well. This would make the software be able to go through a decision tree, and make the printer do certain specific actions.
Something like: IF first layer = true , THEN always retract, ELSE only retract when crossing open spaces.
Re: IF commands
Posted: Tue Sep 11, 2018 6:44 pm
by TheBum
Umake wrote: ↑Sun Sep 09, 2018 6:55 am
+1
I really would like to see IF-THEN-ELSE as well. This would make the software be able to go through a decision tree, and make the printer do certain specific actions.
Something like: IF first layer = true , THEN always retract, ELSE only retract when crossing open spaces.
That would actually be in the Layer Change script, and I'd like to see that too.
Re: IF commands
Posted: Fri Sep 14, 2018 3:44 pm
by S3D-Jake
Thanks for the great feedback, everyone!
The current IF statements that you can use are present in the
Tool Change Scripts.
KeyboardWarrior wrote: ↑Mon Jan 19, 2015 2:12 am{IF OLDTOOL=0}G1 E-10 F1800 - this will only include the line that follows the {IF} brackets if the old tool (the one that was active prior to the tool change) is tool 0. You could use scripts like this to have different tool change retract distances for different tools
{IF NEWTOOL=0}G1 E10 F1800 - similar to the above command, however it checks the new tool (the one that will be active after the tool change)
Re: IF commands
Posted: Fri Mar 07, 2025 5:42 pm
by BaronWilliams
I would like to see universal IF statement support for all scripts. That would be very useful. I ran into a lot of use cases for this.
Edit: as S3D-Taylor states below, this already is supported. The old syntax supported by Tool Change scripts doesn't work for the other scripts. I need to use the updated syntax, which is working great for all scripts including the Tool Change scripts.
Re: IF commands
Posted: Mon Mar 10, 2025 8:50 am
by S3D-Taylor
Already responded here:
viewtopic.php?t=23919
IF statements does work, the syntax just needs to be updated to:
{IF "1+1==2"}