Hi, I am new to Dynamo. I am trying to filter out elements by its reference level. But when I use the boolean operation node such as “!=”, it returns all true in all cases. I am really not sure what to do.
I hope anyone can give me an idea on what is wrong in my script. Thanks in advance.
Thank you very much…
Check the name or element ID of the two levels rather than the level elements. Elements are not directly comparable.
Thank you for replying so quickly. I understand your explanation a bit. But I have a clarification.
The routine i am after is.
- Select Elements by category (Pipes).
- Get the Element’s Parameter Value “Reference Level” to a list.
- Validate if all the values in the list is not equal to the string (“Mean Principal Datum”).
- Output should be Trues and False.
- The output shall be filtered using Boolean Mask.
So as you stated the output list (Level Names) that I got from the pipes cannot be directly compared to a string? Is there any workaround for it?
thank you very much.
Have found out the solution. I added the node “String from Object” before comparing. It produced the desired results. Just to share.
Pan to the right in the watch node, and place a watch node after the drop down selector for the comparison level and I think you’ll see that these are not what you think they are. You can also use an Object.Type node to confirm the data type - if it was the name of the level you would get a ‘string’ value.