09-29-2017 09:49 PM
09-30-2017 01:15 AM
Simply
for one condition if(A==X)(true)else(false)
for more if(A==X)(true)else(if(B<K)(X1)(true)else(if......))
Ciao
09-30-2017 05:42 AM
Thank you for the fast answer, unfortunately I a totally beginner and I don't understand this coding quite well, I will try to explain it better, so I have a metal bar that has a length of 300, on this bar I want to add pockets as pattern feature and I start from the middle, now what I want is to control the pockets nr by lengthe value, if my length is <= to 300 I want 3 pockets, if length is >300 but <400 I want 4 pockets and if length is >then 400 and <then 500 I want 5 pockets, I hope you anderstand thank you
09-30-2017 12:55 PM
Model the bar, the pocket and the respectives copies.
Suppose p1 is the bar lenght and p2 the number of features copies, you can see this in the expression (ctrl+E).
Then set p2 if(p1<=300)(3)else(if(p1<=400)(4)else(if(p1<=500)(5)else(5)))
(I hope the number of parentheses is correct ;-) )
Ciao
09-30-2017 02:10 PM
You could also use a List expressions, particularly if the number of options grows past three or four.
10-02-2017 07:51 AM - edited 10-02-2017 08:13 AM
if(bar_length<400)(3)else(floor(bar_length/100))
The expression above will return 3 if the length is less than 400; otherwise it will return 1 for each 100 units of length.