# CropBox Position on Sheet

**URL:** <https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595>\
**Category:** Revit\
**Created:** [January 21, 2021, 8:14pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595 "2021-01-21T20:14:04Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [January 21, 2021, 8:14pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/1 "2021-01-21T20:14:05Z")

</div>

Hello Dynamo Community,

I would like to get the position of a cropbox on a sheet and found the following node:

> ViewPlan.GetCropBox  
> This node will get the bounds of the view in paper space (in feet)

But it doesn´t work for me 😕

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/6/264be34a876d5b41bf1aeb75e935877c8113aedb.png)

I get the “Dereferencing a non-pointer” error, an empty list or a “failed”-error. Am i doing anything wrong?

Can someone please give me any information about how to get the coordinates of a Views Cropbox on a sheet?

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 21, 2021, 8:37pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/2 "2021-01-21T20:37:33Z")

</div>

Hi @gerhard.p,

To retrieve the cropbox curves :

 ![CropBox](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/d/fd04ef962789c000e587dbce91e617cf1377529f.png)

You need to convert coordinates to have its position on the sheet.  
No luck for you, I already have functions to do the opposite (sheet coordinates to project coordinates) but that’s not the direction you want.

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [January 23, 2021, 10:58am UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/3 "2021-01-23T10:58:22Z")

</div>

Thanks for your reply Alban,

Do I understand correct that the rhythm node would be the right one for my task, if it would work?  
I would be interested in how your functions to do the opposite direction look like!

regards

---

<div class="post-metadata">

**Author:** ![Alban\_de\_Chasteigner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/alban_de_chasteigner/32/39650_2.png) [@Alban\_de\_Chasteigner](https://forum.dynamobim.com/u/Alban_de_Chasteigner)\
**Post date:** [January 23, 2021, 5:03pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/4 "2021-01-23T17:03:58Z")

</div>

> [@gerhard.p](#):
>
> the rhythm node would be the right one for my task

I could be wrong, but I think the description of the node is wrong.

Here is how to transform the coordinates from project to sheet :

 ![Cropbox on sheet](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/7/c704118d39426dafe9ba59b0aecd150718246420.png)  
 ![Cropbox on sheet2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/6/267372f8fc5b3962f253aec5295f841e3b0dea0a.png)

> [@gerhard.p](#):
>
> get the position of a cropbox on a sheet

What is the practical application and your goal?

---

<div class="post-metadata">

**Author:** ![AmolShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/amolshah/32/103244_2.png) [@AmolShah](https://forum.dynamobim.com/u/AmolShah)\
**Post date:** [January 24, 2021, 3:36am UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/5 "2021-01-24T03:36:19Z")

</div>

@gerhard.p Something like this?

 ![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/3/73471ceea358ad8d39810a4a3cd74d654f3101ae.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/2/126f173a9253f32a6b4a85e690c67300576eb2bc.png)

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [January 24, 2021, 12:22pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/6 "2021-01-24T12:22:31Z")

</div>

Hello,

Thanks for your replies! 🙂

As i mentioned in [another thread](https://forum.dynamobim.com/t/place-view-on-same-location/59068) i want to place views on the same location. It does not work with viewports properly because the viewports are far off from equal size because they are affected by so many elements.

But the views always have the exact same Cropbox. So i thought if i could get the coordinates of the cropboxes i could move the views by the corresponding vector.

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [February 20, 2021, 11:00am UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/7 "2021-02-20T11:00:40Z")

</div>

I´m still working on getting the cropbox curves on a sheet.

The big problem is that parallel views have the exact same cropbox coordinates, that means i can transform whatever i want…i´m always getting the same coordinates as a result.

Here is my Graph, would be happy about any advice!

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

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

Edit:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/e/5eb81070e0f98fe9299f1a935927bec832ad9fa3.jpeg)

---

<div class="post-metadata">

**Author:** ![paris](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paris/32/144289_2.png) [@paris](https://forum.dynamobim.com/u/paris)\
**Post date:** [February 21, 2021, 11:07pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/8 "2021-02-21T23:07:28Z")

</div>

Hi @AmolShah witch method do you use on python to get sheet outline? Thanks in advance. Cheers

---

<div class="post-metadata">

**Author:** ![AmolShah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/amolshah/32/103244_2.png) [@AmolShah](https://forum.dynamobim.com/u/AmolShah)\
**Post date:** [February 22, 2021, 3:17am UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/9 "2021-02-22T03:17:35Z")

</div>

@paris This [blog post](https://danimosite.wordpress.com/2019/09/15/placing-multiple-views-on-multiple-sheet-and-a-legend-copier/) served as a base to get the sheet outline code pasted below. Hope this helps you.

```
#Code courtesy of https://danimosite.wordpress.com/2019/09/15/placing-multiple-views-on-multiple-sheet-and-a-legend-copier/

import clr
clr.AddReference("ProtoGeometry")
from Autodesk.DesignScript import Geometry as geom

def tolist(obj):
	if hasattr(obj," __iter__"): return obj
	else: return [obj]

views = tolist(UnwrapElement(IN[0]))

out = []

for view in views:
	oLine = view.Outline
	minU = oLine.Min.U
	minV = oLine.Min.V
	maxU = oLine.Max.U
	maxV = oLine.Max.V

	w = maxU-minU
	l = maxV-minV
	
	myRec = geom.Rectangle.ByWidthLength(w,l)
	sheetRec = geom.Geometry.Translate(myRec,w/2,l/2,0)
	out.append(sheetRec)

OUT = out
```

---

<div class="post-metadata">

**Author:** ![paris](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paris/32/144289_2.png) [@paris](https://forum.dynamobim.com/u/paris)\
**Post date:** [February 22, 2021, 12:24pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/10 "2021-02-22T12:24:00Z")

</div>

Hi @AmolShah thanks for your reponse, for me with tis python it doesn’t work as excepted

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/2/62f0635f1ffe873216a9fe4060b13793835794e5.png) but with your other code works like as a charm  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/b/6b5a88a50ce8a563412b0d5c1689de77e31a6f82.png)  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/6/8685b2a625be4594fb36933c5fe34e1de8f51c54.png)  
Thanks, Cheers

---

<div class="post-metadata">

**Author:** ![paris](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/paris/32/144289_2.png) [@paris](https://forum.dynamobim.com/u/paris)\
**Post date:** [February 22, 2021, 5:39pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/11 "2021-02-22T17:39:45Z")

</div>

and I’m very grateful off course for the first python posted by @SeanP , Now I’m looking for the Outline method.  
Cheers

---

<div class="post-metadata">

**Author:** ![gerhard.p](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gerhard.p/32/147675_2.png) [@gerhard.p](https://forum.dynamobim.com/u/gerhard.p)\
**Post date:** [March 7, 2021, 8:38pm UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/12 "2021-03-07T20:38:27Z")

</div>

Again I´m having trouble aligning views on a sheet, this time with section views.

I´m creating Section views for all columns and place them on a sheet.  
They are not aligned correctly because, again, they are placed by their viewports and not by their cropboxes 😕

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

---

<div class="post-metadata">

**Author:** ![Jin](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jin](https://forum.dynamobim.com/u/Jin)\
**Post date:** [May 3, 2024, 2:38am UTC](https://forum.dynamobim.com/t/cropbox-position-on-sheet/59595/14 "2024-05-03T02:38:14Z")

</div>

I stuck with the same problem! Cannot identify View Cropbox Minpoint on Sheet. @sovitek May you help us?  
I found that the Views.Outline node is good for Floor plan or RCP. For Elevations or Sections, the retrieved boundary is quite weird.
