Filter by input and get desired output

I have standard values, for example, when it sees 300-1000 input, I want its output to give me the values in the code block. Is it possible to do this in python or code block?

If 300-1000KG ROCK represents a range of values you can use a nested conditional statement. If that’s a static value you could also use a dictionary. Both are possible in DesignScript or Python.

1 Like

These are actually a workset name. I have a special number parameter in my project and I want to print those parameters accordingly.

Something like this?

Or like Nick said: A Dictionary:


@volkan.isik likes this?

1 Like

Thank you very much everyone.
This is exactly what I’m trying to do. there seems to be a bug but as a result it works correctly.
I’m sure this code has a shorter and simpler method. :smiley: