Setting a View's Crop Region

Hello,

I’ve created a dynamo to automate interior elevation setup, and in the project I built the dynamo in, everything worked as expected. I switched to a new project, and I keep getting the same error “Warning: View.SetCropRegion operation failed. Starting a new transaction is not permitted…” from Rhythm’s package. I’ve tried it multiple other projects and they fail, but I go back to the original file and it works. I’ve tried disabling all extensions/addins, and troubleshot as far as I can, with no luck.

I’ve created a test file with a cropped down version of the dynamo script and the error persists. Run the script while in elevation “Elevation 1- A” to replicate.

I very much appreciate any help! Thanks.

Dynamo Test File.rvt (1.3 MB)

Interior Elevation Automation_test2.dyn (25.3 KB)

I have seen this before when the node is trying to use standard transactions and/or sub transaction when Dynamo is trying to also use / run it’s transaction that has to be force closed. You could try using a Transaction.End node from the BoundingBox.ByCorners and the SetCropRegion node.

@john_pierson

Thanks Sean for the suggestion, although adding the Transaction.End didn’t fix the issue. I will keep trying different variations.

Thanks Vijay for this thread. @Kulkul used the same node that is causing me problems in the supplied .dyn, and I verified I get the same warning/error when modified to run in my project. It’s frustrating that I’m so close but can’t seem to get past this. Thanks again.

Just an update- I never found a way to use rhythm’s View.SetCropRegion node. I ultimately just found ways around using it, specifically View.SetCropBoxCurves from MEPover.

I am still interested in understanding why this particular node kept having the error, but don’t know enough to really troubleshoot past what I’ve already done. Does the node work for other people, or does it error like it does for me?

@SeanP nailed it on the head here :point_down:

In summary, I need to migrate that node to use Dynamo’s transaction manager probably.

if you found your solution in MEPover, just use that one though as I need to update my node and publish a new version of the package.

-john

2 Likes

John,

Thank you for the reply. I was mostly curious as to whether it was something I was doing, or could avoid doing, that was triggering the error, but thanks for the explanation.

Also, a whole-hearted thank you for all that you do, both here in the forums and through rhythm package. Very very much appreciated. :pray: My use of dynamo would not be the same without it!

1 Like

I am getting stuck on the same issue. Has there been any update on this issue? Also if there’s a work-around, I would love to see the dynamo graph for its solution.

Did you try the mepover option?

Hi! Yes, I am so so so close to the solution. Here is my dynamo graph. The only problem is that the Dynamo generated crop region shows up as a blue line when I try to export the view as an image, which is annoying.

Turn off the revit preview in the Dynamo display settings, or disable the preview of any nodes generating geometry in Dynamo. Sounds like otherwise everything is working which is great.

1 Like

@GavinCrump thanks for the response. Technically the program is working (outputting a picture) but I’m stuck with the original problem I have- the fit to page option is cropping out the outermost pixels. I have posted about it in another post.if you have any insight into the issue, I would really appreciate it!