How to know all deprecated Revit API methods from Dynamo python code?

Let say you built scripts in IronPython2.7 for Revit 2018 and now they don’t work anymore for unknown reasons, supposing it’s about Revit API modifications or deprecated methods.

is there a good way to manage these issues or at least something that identifies or highlights what doesn’t work apart of the node error warnings? By now i try to read and understand the Revit API news for each Revit version but i find this hard or not necessarily conclusive for reviewing existing old code.API Changes 2022

The answers you seek around identifying deprecations are in the api documentation you linked, well so in the very pages which you linked. Further every call which is to be deprecated is marked as such in the calls documentation. As far as I know, because Dynamo doesn’t control the Python Python the Python editor can’t surface deprecation warnings directly. I suppose a ew extension could be added, but that would add a LOT of additional overhead at runtime.

As far as how to maintain a codebase, I recommend moving to a proactive approach.

Set up automated testing, logging, and error handling. Move from ‘in canvas Python’ to custom nodes to simplify deployment, authoring, and management. Consider utilizing C# for your nodes instead of Python as the deprecations are directly surfaces in those IDEs. Read the API docs pages as you author your calls - if the call is shown yellow or red in the version selector in the top left of the page then it should be a clear warning to you as an author that you will have some issues in the future.

2 Likes