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
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 ;-) )
You could also use a List expressions, particularly if the number of options grows past three or four.
The expression above will return 3 if the length is less than 400; otherwise it will return 1 for each 100 units of length.