Extra Dynamo Transaction

Hi All,

When I run the graph for the first time, some extra transactions get created. Any Idea why. ?
Testing.dyn (3.6 KB)

3_Transactions

@Michael_Kirschner2 any ideas?

Could it be the re-binding operation that is causing this?

@Michael_Kirschner2 I’ve also tried to use Element.SetParameterByName without Unwrapping the Revit.Elements but I get the same behavior.

Because your node has a manual transaction in it. I am assuming you copied this code from somewhere and it is always a good idea to review what is in a python script for this and many other reasons.

@SeanP This happens also if I don’t use a manual transaction. I used the manual transaction to be able to name it. This way I know which one is created by the python script.

I have the same problem if I use SetparameterByName as per my previous post

I cannot reproduce your results. I do know that you don’t need the ForceClose if you use the standard TransactionManager references, which may be why this is happening and also you may want to make sure your c.Commit() is before you OUT data.

imageTesting.dyn (6.2 KB)

@salvatoredragotta - notice the ‘extra’ transactions show up before you hid the elements, when you were loading Dynamo player.

On opening Dynamo or Dynamo player, two Dynamo transactions show in the undo history. I am not entirely sure what they’re for, but I doubt they are a part of element binding as no .dyn is loaded at this point so there are no elements created to bind…

My hypothesis is that they are used to get Dynamo to spin up the OOTB Dynamo for Revit nodes, and then for custom nodes and packages, both of which usually require interacting with some aspect of the Revit api and therefore have to load up the DLLs.

I will ask around for some insight into the ‘why’ aspect, but know that they are harmless, and show up any time you launch a Dynamo for Revit instance (even a headless instance, as you get with Dynamo Player).

1 Like

@jacob.small Thanks!

Have you tried do run it in Dynamo Player as well? and back to dynamo?

Testing 2.dyn (3.5 KB)

@SeanP & @salvatoredragotta - no need to even run a graph, in either Dynamo for Revit or Dynamo Player.
Steps to reproduce:

  1. Open Revit.
  2. Open any project.
  3. Open Dynamo or launch Dynamo Player, but DO NOT open/run a graph.
  4. Check the undo history.
1 Like

can you try turning off revit background preview before starting dynamo?

Thanks! I could reproduce in Dynamo for Revit but in Dynamo Player you have to actually run the graph

Thanks. I just tried that. it doesn’t make any difference.
As @jacob.small pointed out, they show up every time I launch Dynamo Revit. Just curious why.

Perhaps I need more testing…

@jacob.small, I do not see any transactions until I run a graph with the Player or Dynamo, but not on opening either of them.

Can you do a screencast showing opening Revit, starting a new project, checking the undo history, opening Dynamo, checking the undo history?

I stand corrected. Not sure why I wasn’t seeing it yesterday (maybe it was the “new” project) but yes, I had two transaction show up following your instructions… which I am not very good at usually! :slight_smile:

These transactions are there for the creation of the Dynamo specific materials used in the Revit background preview. They will only happen if materials with the names Dynamo and DynamoError do not already exist in the file.

5 Likes