Revit Macros using Python vs Revit addin using Interactive python shell vs Dynamo




I am a beginner in Revit automation. I started leaning python a few months back. I am getting confused if python is really a good choice for Revit automation as Revit API is .net.
I started writing python scripts using interactive python shell, it works fine but sometimes there are some issues with the python wrapper. check below-
The below code from Proving Grounds got me stuck due to the wrong return types

The issue with a free source python shell is the maintenance I guess.

Now I researched came to know Revit Macros works with python. As macros is inbuilt in Revit, it is more sensible but there is no debugging tools if we use python, the Step Into button is disabled while using Python.
Is there a solution to this ?

I think Dynamo is a better choice than the two above if I want to stick to python. I want to know your suggestion and inputs on this.


Why force yourself into a python bubble? In my opinion, there are many benefits to using Dynamo. Others may disagree, but I’ll put my reasoning out here.

  1. Instant and periodic feedback as sequences nodes will return results in order.

  2. Large community of developers who share TONS of resources and tools, usually including source code for you to edit and repurpose as needed.

  3. Easier maintenance as each piece of code stored in a custom node only needs to be updated and tested once per release, where as each python add in you write will have to be tested individually for breaks along the way. As an example, let’s say the method for selecting all elements of category changes, and you called this method in 30 different ‘automation routines,’ in both Dynamo methods, and in python methods. Updating a single Dynamo node would fix that for you and the entire organization (assuming you can push it out). Whereas every individual Python adjustment you write will have to be updated individually, meaning you have to edit 30 individual sets of python code.

  4. Ability to leverage most Python and C content that other tools use as you can write custom python nodes, zero touch nodes, and whatever other method you so desire.

  5. Built in UI which can expand as needed (Dynamo player + datashapes nodes).

  6. Easier to modify to solve the next issue you face. Another example: that graph that renumbered rooms by spline can also number parking spots, furniture, spaces, areas, and whatever else you might want by simply adjusting the graph, at a simple enough level that most users can make the adjustment with minimal guidance. If a users says ‘can you make this python based add-in renumber parking instead of rooms’ you’re more than likely going to have to do this yourself, then roll out out to them as a new add-in, or an addition to your library.

Just my two cents.