# Problem Setting Crop boxes and Section Boxes in Revit 2022

**URL:** <https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [November 5, 2021, 8:46am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045 "2021-11-05T08:46:01Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [January 27, 2022, 7:15pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/22 "2022-01-27T19:15:18Z")

</div>

> [@john\_pierson](#):
>
> please send me a sample file that reproduces this issue so I can debug

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/4/f447ddade28406fdba5590854a905b9af6490e00.png)  
DYN showing the issue. Thank you for checking.  
[view set section box test - truevis - revit 2022.dyn](https://forum.dynamobim.com/uploads/short-url/qZ17I1WBVE872rSx9Q4oyAlFkQ9.dyn) (32.5 KB)

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 27, 2022, 7:15pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/23 "2022-01-27T19:15:51Z")

</div>

.dyn only doesn’t help. This node will be removed from rhythm.

sorry about that.

The summary is, there is some weird bug with the ByCorners node in Dynamo (in newer versions it seems) and I cannot fix it.

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [January 27, 2022, 7:16pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/24 "2022-01-27T19:16:37Z")

</div>

> [@john\_pierson](#):
>
> .dyn only doesn’t help. This node will be removed from rhythm.

Do you think something changed in the 2022 API?

---

<div class="post-metadata">

**Author:** ![john\_pierson](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/john_pierson/32/191977_2.png) [@john\_pierson](https://forum.dynamobim.com/u/john_pierson)\
**Post date:** [January 27, 2022, 7:18pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/25 "2022-01-27T19:18:04Z")

</div>

I modified my answer above to help. But in Revit, no, nothing changed regarding setting 3d view crop boxes.

BoundingBox.ByCornerPoints is a node in the Dynamo libraries. Something happened there with the geometry or with the `ToRevitType` converters [here](https://github.com/DynamoDS/DynamoRevit/blob/master/src/Libraries/RevitNodes/GeometryConversion/GeometryPrimitiveConverter.cs).

**At this point the node will be removed from Rhythm and that is all the remaining comments I have at this time.**

I am revising the title of this thread to better represent the future goal. Also, please feel free to start a new thread if that works better for you.

I wish you all the best of luck in making this work with other packages/nodes.

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [January 27, 2022, 7:47pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/26 "2022-01-27T19:47:52Z")

</div>

Here is a workaround for making a View with a specific orientation and SectionBox in Revit 2022:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/e/ce750c3d89c77bc93036ed9911da418f5f17adc0.png)  
Result:  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/d/ad713ac0ad955a09ec5a4a3b443f013640374bf3.png)

The Python from _3DView Set Orientation_ or _3DView by BoundingBox_ could be changed to not need the “Control View” and just make an orientation to make it slicker. Thanks to @jw.vanasselt for the GeniusLoci clue, and all y’all for looking at this issue.  
[view set section box workaround - truevis - revit 2022.dyn](https://forum.dynamobim.com/uploads/short-url/t5EB9VX55G4jiJ5j6uaM4F3NASB.dyn) (41.7 KB)

---

<div class="post-metadata">

**Author:** ![jw.vanasselt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jw.vanasselt/32/133533_2.png) [@jw.vanasselt](https://forum.dynamobim.com/u/jw.vanasselt)\
**Post date:** [January 28, 2022, 6:44am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/27 "2022-01-28T06:44:51Z")

</div>

Thank you for you’re support John.  
Pity that this node will be removed but unfortunately it is no different.

@truevis thanks to you too 🙂

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [January 28, 2022, 7:24am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/28 "2022-01-28T07:24:58Z")

</div>

I hope someone clever with Python can combine _3DView Set Orientation_ or _3DView by BoundingBox_ and make it work without having to make a View just to set the orientation.

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [January 29, 2022, 9:11pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/29 "2022-01-29T21:11:06Z")

</div>

AxonometricView.ByEyePointTargetAndboundingbox is also broken with what looks like the same error as the Rhythm node.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/0/e0931b9bb094128c9f030d7c355f6285b424a9f1.png)

---

<div class="post-metadata">

**Author:** ![jw.vanasselt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jw.vanasselt/32/133533_2.png) [@jw.vanasselt](https://forum.dynamobim.com/u/jw.vanasselt)\
**Post date:** [January 31, 2022, 6:50am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/30 "2022-01-31T06:50:34Z")

</div>

That’s weird, do you think this is a dynamo 2.12 problem?

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [February 3, 2022, 6:24pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/31 "2022-02-03T18:24:10Z")

</div>

I found a node/python that works! The code came from package `Zhukoven.com` node `BoundingBox.ToSectionBox`. I just changed its output a little.  
[view create set section box w orientation alternative solution - truevis - revit 2022.dyn](https://forum.dynamobim.com/uploads/short-url/awjEBsRBHmTQ7CS0Nbf0gAkYCjY.dyn) (24.7 KB)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/c/9cc50bbbe9550f80eef4043f831c9ebb3532372e.png)

```auto
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)

clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
bbox = IN[0]
view = UnwrapElement(IN[1])
try:
    TransactionManager.Instance.EnsureInTransaction(doc)
    newmax = UnwrapElement(bbox.MaxPoint).ToRevitType()
    newmin = UnwrapElement(bbox.MinPoint).ToRevitType()
    newbox = BoundingBoxXYZ()
    newbox.Max = newmax
    newbox.Min = newmin

    z = view.SetSectionBox(newbox)

    OUT = view
except:
    OUT = "Error"

```

---

<div class="post-metadata">

**Author:** ![jw.vanasselt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jw.vanasselt/32/133533_2.png) [@jw.vanasselt](https://forum.dynamobim.com/u/jw.vanasselt)\
**Post date:** [February 4, 2022, 6:25am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/32 "2022-02-04T06:25:54Z")

</div>

That’s nice, does it work for all revit versions?

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [February 4, 2022, 7:19am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/33 "2022-02-04T07:19:20Z")

</div>

> [@jw.vanasselt](#):
>
> does it work for all revit versions?

One would have to test it.

---

<div class="post-metadata">

**Author:** ![jw.vanasselt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jw.vanasselt/32/133533_2.png) [@jw.vanasselt](https://forum.dynamobim.com/u/jw.vanasselt)\
**Post date:** [February 4, 2022, 9:28am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/34 "2022-02-04T09:28:43Z")

</div>

It works in R20 and higher 🙂 You need to make a custom node with lacing to longest.

Thanks for sharing!

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [February 15, 2022, 5:31pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/35 "2022-02-15T17:31:13Z")

</div>

See `ViewSectionBoxFromBoundingBox` from truevis for new node.  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/4/f43d6b00a3a8c87c1db64afd4da7b953de0a2cf0.png)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/7/07b74918c8c638389e3f7e4938b534b90edde49e.png)

---

<div class="post-metadata">

**Author:** ![esanthir](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/esanthir/32/138610_2.png) [@esanthir](https://forum.dynamobim.com/u/esanthir)\
**Post date:** [May 22, 2022, 4:01pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/36 "2022-05-22T16:01:39Z")

</div>

I had the same problem, didn’t get it to work with the truevis node either - what worked, was creating a cuboid out of the section box and then converting back to a section box again. Might be worth a shot for someone, even if it’s a dumb solution.

---

<div class="post-metadata">

**Author:** ![S1arhei](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@S1arhei](https://forum.dynamobim.com/u/S1arhei)\
**Post date:** [September 6, 2023, 5:13pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/37 "2023-09-06T17:13:06Z")

</div>

Doesn’t work

 ![Screenshot 2023-09-06 101243](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/e/9e383efd584ed1179060d6661ccf7ed2af9bed3c.png)

---

<div class="post-metadata">

**Author:** ![truevis](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/truevis/32/8634_2.png) [@truevis](https://forum.dynamobim.com/u/truevis)\
**Post date:** [September 12, 2023, 6:51am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/38 "2023-09-12T06:51:14Z")

</div>

> [@S1arhei](#):
>
> Doesn’t work

Maybe the inputs have to be lists, not single items.

---

<div class="post-metadata">

**Author:** ![jw.vanasselt](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jw.vanasselt/32/133533_2.png) [@jw.vanasselt](https://forum.dynamobim.com/u/jw.vanasselt)\
**Post date:** [September 12, 2023, 9:01am UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/39 "2023-09-12T09:01:07Z")

</div>

Try to make the inputs to a list or change lacing to longest

---

<div class="post-metadata">

**Author:** ![S1arhei](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@S1arhei](https://forum.dynamobim.com/u/S1arhei)\
**Post date:** [September 12, 2023, 2:37pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/40 "2023-09-12T14:37:48Z")

</div>

No luck so far…

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/7/d78312e6628e304ac9e9a0ed3b294e23b6d76224.png)

---

<div class="post-metadata">

**Author:** ![S1arhei](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@S1arhei](https://forum.dynamobim.com/u/S1arhei)\
**Post date:** [September 12, 2023, 2:44pm UTC](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045/41 "2023-09-12T14:44:45Z")

</div>

Here is the draft dyn, where I tried different nodes (doesn’t work so far)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d1d448fe7d492a62b243388dde480aefe158db67.png)  
[ViewSectionBoxFromBoundingBox.dyn](https://forum.dynamobim.com/uploads/short-url/iKk28vH4Caddm2NR5BUVosJxEo8.dyn) (48.3 KB)

[Previous page](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045.md?page=1)

[Next page](https://forum.dynamobim.com/t/problem-setting-crop-boxes-and-section-boxes-in-revit-2022/70045.md?page=3)
