Enqueue Action not working - 'Action Not Defined'

Hi there,
I’m following the Rhino.Inside Revit tutorial for GHpython, and I’m having difficulty with baking Rhino elements into Revit.

The guide page:

When I trigger the button, it doesn’t give me a Revit generic model.

I tried to use a Boolean toggle instead of a button, but then I get this runtime error:
When I use the script that you detailed in the guide, why does it give me a runtime error “name ‘Action’ is not defined”? I am using Revit 2017.

More explanation on transactions is much appreciated.


You seem to be missing the from System import Enum, Action import at the top
See the link for the full script:

In next release EnqueueAction will be obsolete and removed in the future, so please don’t relay on it.

Here you have a sample on how to do a custom Baker component without using EnqueueAction.
RiR-Bake.gh (15.9 KB)

Thank you. This worked for me.

May I ask that on line 31 where “Geometry” comes from? I copied your codes including the imports into my own python component and the system returns that “name ‘Geometry’ is not defined”.

The input on the custom component, in this case its a sphere into Geometry.