No problem. I suggest having a read of dynamo primer, and especially on code blocks (very useful)
For the top Script
- The code block:
a > x
a < x
This creates 2 outputs, which show whether or not this equation is true or false for each of the inputs from the list of pipe sizes.
- Because you are looking for more than one IF condition, you need to find when both are True. Therefore using a Code block with an AND Logic (using && here. note: OR would be: a || b )
This then outputs TRUE only if both inputs are TRUE. I’ve added a "Watch node after this code block to explain it a little better:
The reason your script still tags all the elements, is because that’s what you have told it to do… The output of the IF node is true or false, and therefore, if true it will run the element tag node (Which you have put all pipe elements of the whole model)
Apologies, I may have lead you the wrong way a little. You need to filter the pipes that you want to tag, so you need to filter the “elements” list, not the list of diameters.
Try the below. Essentially the major change is that I have connected the output from “Elements” as the list input to the filter by boolean. Hope it helps.
Note: that this is filtering all the pipes in the whole model, but the tag element node is tagging only pipes in the specific view. This may cause an error, but i’m not sure. Or you might be able to Tag all pipes on all views if you create a list of views… Good luck!