Rhythm node causing transaction error

Hi all,

Bit of a weird bug that I’m experiencing while trying to utilise the view.SetCropRegion node within a script which is also creating the views I’m trying to set the crop region of.

After getting the script to a certain point I starting having issues with the following error message displaying on any revit interfacing nodes:
Ele error

Starting a new transaction is not permitted. It could be because another transaction started and has not yet been completed yet. or the document is in a state in which it cannot start a new transaction.

After an iterative process of of freezing portions of the script I tracked down the error maker to be the view.SetCropRegion node. As, if I freeze this node, I have no issues with the rest of the script and the elevations are created (albeit with an undefined crop region).

I’ve tried a number of passthrough configs as well as forcing a transaction.end but to no avail. Every time I get pushed this error.

Could it be something to do with the ElevationMarker.Create node and view.SetCropRegion node not enjoying being together?

I’d ideally like to keep this within 1 script so any suggestions would be appreciated!

Sort of yes, but not because they are together.

I believe that in order to set the crop, the view and it’s associated elements need to first be committed to the file.

Pass the results of the WaitFor node into a Transaction.End node followed by a Transaction.Start node. This will commit the initial portion of the graph to the file before starting a new transaction to accomplish the subsequent actions.

Thanks for the response, Jacob.

Unfortunately, the suggestions didn’t solve the issue!

Weirdly, what did happen is that the elevation markers were placed but once it got downstream to the crop set node which errored they disappear…spooky!

Seems I might have a case of elevational haunting haha.

Any further recommendations?

Can you post the smallest version of that DYN and an RVT which reproduces the issue?

This node might be having issues as I recall something similar coming up and I have not had a chance to fix it.

If I recall correctly, the GeniusLoci package has a set crop region node. Try that one.

Ahh that might explain it - Well im gonna post the test file forcing error anyway because I just stripped it out haha.

Couldnt see a node in Genius Loci but there was one in Orchid.

Annoyingly that node seems to be deleting the views after running instead of cropping them?

Thanks both for suggestions so far and any more you can provide! (also a great weekend if you can help no more!)

ForumCreateElevationMarkers.rvt (1.2 MB)
FORUMCreateElevationViews.dyn (79.3 KB)

Dynamo version 1.3.4 (I know sorry)
Revit version 2019

this is going to be a problem I think. Why are you not on 2.0.4?


My bad, I told a lie!

I thought we were on 1.3.4 for R19 users but forgot that I’d upgraded us away form that ages ago (the version I’m trying to get this to work in is 2.0.3).

Apologies, I’m used to working in 2.6 this is in an earlier version for a project specific task!

1 Like

Hi all,

Just an update to this post - The error was actually being caused by me feeding invalid bounding boxes into the BB input on the Rhythm node!

I overlooked this before as it was still outputting bounding boxes, it was only when I tried converting them to cuboids and it wouldn’t that I realised I had an issue.

This was exacerbated by the Rhythm node giving a ‘transaction error’ which sent me on a wild goose chase !

@john_pierson maybe this could be fed back into a revision of what is being caught / triggering that transaction error report?

Thanks again to all for suggestions.

1 Like

Thank you so much for updating us. All too often folks leave this hanging and it is extremely unfortunate for others to not know what went wrong. As a package author, it also sucks when people don’t update us because we don’t know how (or if we need) to fix it and it comes up again.

Right now I am using Revit’s builtin methods to raise the error given to my node by the Revit API to you on the hover tooltip and coloring the node yellow.

I went ahead and added the following message for when you feed an incorrect crop box:

screenshot of original post of solution for reference.


No probs at all - Glad to contribute to the contiual learning of all! Thats what its all about after all ey?

Thanks also for incorporating the additional message, hopefully help others in the future.

See you around here again soon :smiley:

1 Like