# Set Crop Region Visible to No

**URL:** <https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [December 18, 2019, 2:08pm UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658 "2019-12-18T14:08:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![bialmeida](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bialmeida/32/62015_2.png) [@bialmeida](https://forum.dynamobim.com/u/bialmeida)\
**Post date:** [December 18, 2019, 2:08pm UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/1 "2019-12-18T14:08:51Z")

</div>

Hello everyone,

i am working with a graph that duplicates the views I selected as a dependent, then applies a scope box to the duplicated views. The last thing i would like to do is not working correctly though - set the crop region visible to NO. What am I doing wrong here? 😫 Cheers!

[test.dyn](https://forum.dynamobim.com/uploads/short-url/aC4Anxu7riGAdbrSM4IAn6m4ywk.dyn) (33.4 KB)

 ![test](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/9/79039ce1b298e2646bac4d546edd6032803e0f61.png)

---

<div class="post-metadata">

**Author:** ![MartinSpence](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/martinspence/32/25208_2.png) [@MartinSpence](https://forum.dynamobim.com/u/MartinSpence)\
**Post date:** [December 18, 2019, 2:21pm UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/2 "2019-12-18T14:21:12Z")

</div>

Hey @bialmeida,

You can try with a Transaction.End node:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/8/f814f5e080156c496414eda95de3e13b588b8422.png)

---

<div class="post-metadata">

**Author:** ![bialmeida](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bialmeida/32/62015_2.png) [@bialmeida](https://forum.dynamobim.com/u/bialmeida)\
**Post date:** [December 18, 2019, 2:26pm UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/3 "2019-12-18T14:26:01Z")

</div>

I read another topic quite similar to mine and that was the other person’s mistake indeed, so I tried to do the same. In my case it doesn’t work because the output I am trying to use is an array (perhaps because i used cross product ?)

 ![test](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/b/eba5fe40625bc123ff8d37e62967dd51505a35b1.png)

---

<div class="post-metadata">

**Author:** ![maciek.glowka](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/maciek.glowka/32/70695_2.png) [@maciek.glowka](https://forum.dynamobim.com/u/maciek.glowka)\
**Post date:** [December 18, 2019, 4:15pm UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/4 "2019-12-18T16:15:43Z")

</div>

would it work with python?

```
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
#The inputs to this node will be stored as a list in the IN variables.
views = UnwrapElement(IN[0])

doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)

for v in views:
	v.CropBoxVisible = False
	
TransactionManager.Instance.TransactionTaskDone()
#Assign your output to the OUT variable.
OUT = 0
```

---

<div class="post-metadata">

**Author:** ![kennyb6](https://avatars.discourse-cdn.com/v4/letter/k/7ba0ec/32.png) [@kennyb6](https://forum.dynamobim.com/u/kennyb6)\
**Post date:** [December 18, 2019, 4:23pm UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/5 "2019-12-18T16:23:10Z")

</div>

I think the issue is the lacing and levels. I don’t know your exact dataset but using @L2 with cross-product even though both of the other inputs are only a single element may be messing you up.

---

<div class="post-metadata">

**Author:** ![MartinSpence](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/martinspence/32/25208_2.png) [@MartinSpence](https://forum.dynamobim.com/u/MartinSpence)\
**Post date:** [December 19, 2019, 7:57am UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/6 "2019-12-19T07:57:06Z")

</div>

Sorry, I didn’t notice the cross lacing, as @kennyb6 pointed out.

The attached works for me, but it is only tested with a single view, though.

See if it gets the job done 🙂

[test\_return.dyn](https://forum.dynamobim.com/uploads/short-url/jjralPygabdTOUOUDnY3Z2eqcQy.dyn) (34.5 KB)

Edit: Just fyi, I implemented a boolean swith in the selection node, to make it easier to “reset”.

---

<div class="post-metadata">

**Author:** ![MJB-online](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/mjb-online/32/24884_2.png) [@MJB-online](https://forum.dynamobim.com/u/MJB-online)\
**Post date:** [December 19, 2019, 8:05am UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/7 "2019-12-19T08:05:30Z")

</div>

This is how i wired things up (a bit old school maybe).

 ![CropRegionVisible](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/5/25d9fa6046a5556ffeb60ca51bb30a30c9cb8bc3.png)

---

<div class="post-metadata">

**Author:** ![bialmeida](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bialmeida/32/62015_2.png) [@bialmeida](https://forum.dynamobim.com/u/bialmeida)\
**Post date:** [December 19, 2019, 9:13am UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/8 "2019-12-19T09:13:55Z")

</div>

That works, thanks!

---

<div class="post-metadata">

**Author:** ![bialmeida](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bialmeida/32/62015_2.png) [@bialmeida](https://forum.dynamobim.com/u/bialmeida)\
**Post date:** [December 19, 2019, 9:14am UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/9 "2019-12-19T09:14:41Z")

</div>

That works too, thank you very much!

---

<div class="post-metadata">

**Author:** ![bialmeida](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bialmeida/32/62015_2.png) [@bialmeida](https://forum.dynamobim.com/u/bialmeida)\
**Post date:** [December 19, 2019, 9:15am UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/10 "2019-12-19T09:15:12Z")

</div>

old School works perfectly! Thanks!

---

<div class="post-metadata">

**Author:** ![pk\_huyen](https://avatars.discourse-cdn.com/v4/letter/p/7ab992/32.png) [@pk\_huyen](https://forum.dynamobim.com/u/pk_huyen)\
**Post date:** [July 8, 2021, 7:25am UTC](https://forum.dynamobim.com/t/set-crop-region-visible-to-no/44658/11 "2021-07-08T07:25:49Z")

</div>

Hello, I am trying to turn off my new Viewport Crop Region using with following script but it doesn’t work.  
newViewport.LookupParameter(‘Crop Region Visible’).AsInteger().Set(0)  
and also  
newViewport.GetParameter(‘Crop Region Visible’)[0].AsInteger().Set(0)  
Can anybody give me some help? Thanks
