Element Types and instance

Simple question: Why is the element type taken from a wall instance not equal to the same element type pulled from a list of all the element types of wall types in my project? The ID numbers are the same; what is different about how Dynamo sees these?
I’m using Dynamo 2.3.1.

Not all objects are comparable. That’s all it is. Converting the type to a string or using the ElementId is the way to go.


Ok. I used String From Object before, though figured I’d ask if I could forego that step.

1 Like

I wanted to chime in and say that if you are wanting to obtain wall type from the corresponding element type, then using WallType.ByName is generally how I have done that. That would be faster and more clear that filtering out a secondary list of wall type elements.

If that isn’t your end goal, feel free to ignore. :grin:

@john_pierson That sounds handy, though I’m not sure what you mean by that. Since WallType.ByName takes a string input, how would I use that when my starting point is an Element Type (not a string unless I make it one)? Or do I simply change the format to a string?

ElementType > Element Name > WallType.ByName

1 Like

Ah. Of course. Thank you!



You can use List.Equals


1 Like