Issue with Element.Name?

Hi All,
Im not sure if i have done something wrong here but i am trying to select specific system types so i can change the workset that all pipes of particular system type are on. There is plenty of information out there but i keep getting an error on the element.name node which states “asked to convert non-convertible types”
Am i doing something wrong here? it seems intuitive enough i just keep getting the error.

Expand the preview for the Element.GetParameterValueByName node. If the resulting data type isn’t a Revit element (has a green highlighted number) than that node won’t work, and you’ll need to get to the element another way.

unfortunately they are all grey. (sorry colorblind so that is how they look). It has the desired result in the node preview it just throws the error as above.

Expand the preview of the prior node, right before the Element.Name node. Look for items which are not a Revit Element.

Wiring the Element.GetParameterValueByName node into an Object.Type node followed by a List.UniqueItems node will help confirm everything is a Revit element of some sort instead of something like a null value. Hard to narrow down the issue among 15000+ items without seeing the data.

Thanks Jacob, I have discovered the issue. there are a few instances where the pipe system type is “undefined”. I tried to filter these out with a bool mask and I tried a clean.list but it did not produce the desired result. I’m hoping some has an idea on how to resolve this so the undefined system type is removed. the 2 element types are “Revit.Elements.ElementType” & I believe the undefined pipe is “System.String”

Hi Here is one way there probably can work…

2 Likes