Setting element parameter using conditional IF statement only works for TRUE

Hello,
I want to be able to set element parameter using a conditional IF statement but the script is not working properly.

It always set the element parameter as if it’s true, regardless of the test result.

Hi @eslam.abdo.taha difficult to see your image…anyway try with scopeif or something here…

1 Like

Thanks for your reply. but I tried those and I still get the same result.
I want to use the conditional if statement node to set a certain parameter value according to a boolean test.
If the test is true then the parameter value should be a certain text value.
If the test is false then another text value should be written in that parameter.
what happens is whether the test was true or false, the answer is the same and doesn’t change.

I am suspecting that the problem is with the parameter itself that it doesn’t auto-update when I re-run the script and keeps the same value stored forever.

Hi could you share your file

2 Likes

If I’m seeing your graph correctly, you have the If statement in the wrong location. Use the If statement to sort the two strings “Size is good” true input and “Size must be increased” false input. Then feed the result of the if statement into the value input of the Set Parameter Value node. Use the ScopeIf+ node so you can set the lacing if needed.

1 Like

Thanks for your time and effort. the problem was solved.

Thank you very much. That solved it.

1 Like