# Crop 3D View Python Script Issue

**URL:** <https://forum.dynamobim.com/t/crop-3d-view-python-script-issue/99293>\
**Category:** Revit\
**Created:** [March 21, 2024, 12:12pm UTC](https://forum.dynamobim.com/t/crop-3d-view-python-script-issue/99293 "2024-03-21T12:12:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kvusal](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@kvusal](https://forum.dynamobim.com/u/kvusal)\
**Post date:** [March 21, 2024, 12:12pm UTC](https://forum.dynamobim.com/t/crop-3d-view-python-script-issue/99293/1 "2024-03-21T12:12:42Z")

</div>

Dear Experts,  
I found good python code in order to implement crop for the 3d Views.  
However, i realized that mentioned script not working properly ☹  
Do you have any opinion about the problem?  
[set CropBox in 3DView.dyn](https://forum.dynamobim.com/uploads/short-url/6FPay78xPDqb4WQhock3zQPgdea.dyn) (9.2 KB)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/1/514e2f2101a733fa6296b4d1a1feed16c4aedeb6.png)  
Revit Model:  
[https://we.tl/t-tJQrMfCMuo](https://we.tl/t-tJQrMfCMuo)

---

<div class="post-metadata">

**Author:** ![kvusal](https://avatars.discourse-cdn.com/v4/letter/k/47e85d/32.png) [@kvusal](https://forum.dynamobim.com/u/kvusal)\
**Post date:** [March 21, 2024, 1:04pm UTC](https://forum.dynamobim.com/t/crop-3d-view-python-script-issue/99293/2 "2024-03-21T13:04:16Z")

</div>

There is one more alternative Python script which works great for each views. But I dont know how can i apply this scipt for multiple views ☹  
[3D Crop Alternative.dyn](https://forum.dynamobim.com/uploads/short-url/AcYk6REKxcdQJ2CtoIl7TCSsBIK.dyn) (8.2 KB)

---

<div class="post-metadata">

**Author:** ![Mark.Ackerley](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mark.ackerley/32/79310_2.png) [@Mark.Ackerley](https://forum.dynamobim.com/u/Mark.Ackerley)\
**Post date:** [March 21, 2024, 1:07pm UTC](https://forum.dynamobim.com/t/crop-3d-view-python-script-issue/99293/3 "2024-03-21T13:07:26Z")

</div>

Hi,

If you amend your code to this, it works for me?

```auto
        pt3 = tfView.OfPoint(XYZ(bbxElemB.Min.X, bbxElemB.Max.Y, bbxElemB.Max.Z))
        pt4 = tfView.OfPoint(XYZ(bbxElemB.Max.X, bbxElemB.Min.Y, bbxElemB.Min.Z))

```

Hope that helps,

Mark
