Element.GetLocation & Viewport

I have a graph that has been working fine, but suddenly one of the nodes is failing
I’m passing the Viewports on a Sheet to the Element.GetLocation node & the error tells me it’s looking for s structural element.
Pretty sure I’ve had this working in 2.0 in the recent past and I know it’s working in 1.3. I can’t think of anything that’s changed recently.
Any ideas why the GetLocation doesn’t like my Viewports?

Never mind. FTFM (Fixed That For Myself)

Turns out it wasn’t the GetLocation node that was the problem. That’s just where the problem showed up.
I have no idea how, but somehow the Categories node got changed to Viewports. I need it set to Titleblocks. Once I changed that back, the rest of the graph was happy once again.

1 Like

Maybe its not me.
I set the Categories node, tested and it was working fine.
Then I saved the graph, and when I came back to it late, the Categories node was set to some Structural

Why would the Categories node change itself???

As updates are made in each version of Revit, categories are added. The dropdown category node seems to be based on an index value in the overall list of categories, so when categories are added the list will shift but the index does not. The more reliable way is to use the category by name node. That way it will remain the same in each version of Revit no matter how many categories are added.