How To Ensure Selected Category Node Element Remains Selected Node Element Between Revit Versions

Hey There -

Hoping someone might be able to help with this. I built a script using the “Selection.Category” node, with “Rooms” as the Category selected in the node. I notice, however, that when I open the script in a different version of Revit, the selection changes to another selection beginning with “R”. I believe this is because later versions of Revit have added more category names, impacting positioning on the overall list of categories. Is it possible to build into the script “Rooms” as the selected category to prevent this change? Right now, I have a group of nodes in my script labeled “Inputs”, but I’d like to keep items to select prior to running the script to a minimum if at all possible.

Any guidance is greatly appreciated!

Well, the good news is that this is resolved in Revit 2020.

The ‘fix’ for those older versions is to use the ‘category.ByName’ node, and leverage a string input instead.