rajaakahel
Posts: 4
Joined: Mon Nov 28, 2016 8:48 am

IF commands

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?
Umake
Posts: 8
Joined: Fri Jun 17, 2016 6:38 pm

Re: IF commands

+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.
TheBum
Posts: 203
Joined: Fri May 18, 2018 11:13 pm

Re: IF commands

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.
S3D-Jake
Posts: 1052
Joined: Wed Jun 20, 2018 12:45 pm

Re: IF commands

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)
"A bird does not sing because it has an answer. It sings because it has a song."
User avatar
BaronWilliams
Posts: 183
Joined: Tue Jul 15, 2014 8:30 pm

Re: IF commands

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. :D
Last edited by BaronWilliams on Sat Mar 15, 2025 2:47 pm, edited 2 times in total.
S3D-Taylor
Posts: 78
Joined: Tue Jun 20, 2023 10:55 am

Re: IF commands

Already responded here: viewtopic.php?t=23919

IF statements does work, the syntax just needs to be updated to:
{IF "1+1==2"}

Return to “Feature Requests”