How to find elements with incorrect parameter values?

I’m new to Dynamo and starting with something simple. I’m trying to find all panelboards with an ‘H’ in their name, and then checking those to see whether they have been assigned 277/480V (i.e. high voltage).

I’m trying to do this with a couple nested FilterByBoolMask’s, and it seems to be finding the right quantity of mismatched values, but it’s not identifying the right elements.

You first filter your panels by those with H but then filter the original list when looking at voltage. You need to filter the previously filtered list since that’s what you’re querying for voltages.

you are filtering a list that contains every panel in your project, including the ones without “H” on its name, that’s why you are getting a worng answer, the solution to what you need is to filter not every element but the “in” list of the first filter, in that case, the last watch node will give you the correct object name

Thanks guys, that fixed it exactly.

For long term use, is this a good method of filtering elements like I’m doing, or is there a better or simpler way you can recommend?

Your script looks quite optimized, the only thing i would suggest is replacing the code blocks by strings and the for first node use family type by name because sometimes when using another dynamo version this selection could get reset.

On a side node you could use 1 filterbyboolmask and 2 string.contains with then a not! Node and using a list.alltrue node

String.contains (2x) > Not! (1x) > List.Combine with List.Join as combinator > List.alltrue > List.filterbyboolmask

1 Like

filter by bool mask is one of my favourite nodes… however, I wouldn’t use code block to write strings… main reasons:

  • can’t be used as “input”
  • always require to type de quotes (")
  • always require to type the (";")

instead, I would try to use the “string” node for strings


@Daan true, always try to avoid dropdown selection nodes… unless uses as “input”

1 Like