You could use two if statements in a row, one to figure out if its above or below 150, and if its above then do an if statement for 150-200 or 200-300.
I’d probably just write a small python script with two if statements
In the post, I just put an example… I have so many conditions… it might be around 50-60…
I have tried using python script … it is work with one input … but ho two use the same python script for each individual list items
I will try the way you have shown in the image.
But I have many elements in my model… based on element location I have made a list of X and Y coordinates.
Now I want to add parameters based on X or Y coordinates.
as posted in 3rd post… have 50-60 conditions. it will have many nested IFs
Properly said: I used 10 boxes (from 0 to 1 …9 to 10, 10 lines here and projection of a point on one of them or not)
Your “boxes” of storage will have to be written at one time or another if they are regular, you can automate.
I think you have to make a function (it all depends on your skills, either in designscript or python)
Hola Amigo @fkp7057 buenas. Is mandatory evaluate positions? the easy way to me is create your list and imposs the values, the other option is transform values to string and use String.Contains to evaluate if match the values ranges, Hope this ideas help you!
You need to create a conditional statement either in python (with list comprehension so it iterates for each item) or in a code block using DesignScript (which will iterate automatically).
The shorthand for a conditional If statement in DesignScript is condition ? returnTrue : returnFalse;
and reads as “If condition is true then returnTrue else returnFalse.”
You can stack multiple conditions by nesting a new If statement inside a returnTrue or returnFalse value.