Revit/Dynamo Error utodesk.Revit.Proxy.Exceptions.InvalidObjectExceptionProxy exception after running custom node

I wrote a node in python that will run addins based on the PostCommand method. It runs fine the first time but wont run after that. I have to restart revit to get it working again. Looking at the journal file i see this:
’ 1:< API_ERROR { Autodesk.Revit.Proxy.Exceptions.InvalidObjectExceptionProxy exception(The managed object is not valid.) was thrown from a handler of Autodesk.Revit.Proxy.UI.Events.IdlingEventArgsProxy event. The API event handler was registered by application Dynamo For Revit (8d83c886-b739-4acd-a9db-1bc78f315b2b). Changes made by this handler are going to be discarded. }
I also get this popup when trying to start Dynamo in the same session as running the custom node:

It must have to do with external event. I must have to handle this differently but dont know how.

Try restarting your System (PC).

Thanks for the Reply Kulkul. A restart of Revit always did the trick. Do you know is there a way to reset dynamo. It seems once i run the custom node in order for me to run it again i have to change something in the workspace?

That is by design, to enable quicker execution of large definitions nodes that aren’t altered aren’t processed.
In manual mode you can see which nodes are to be processed by checking Show Run Preview in Settings

Thanks Vikram

1 Like