Crop Region Boundary edit by dynamo

Can anyone suggest how to crop Region Boundary by dynamo. As shown in image i want to set region boundary at 200 from element so please suggest how to do it.

What have you tried so far?

You can take the bounding box of it, get the min and max points, and move them the 200. If it has geometry or curves, you could do something to that.

1 Like

Thanks mate…
Can you please provide me any example as i am not aware of how to do it. This is the first time i am trying this.

1 Like


1 Like

i have given you two parts off a graph to create crop views
maybe this gives you a good start

1 Like

Thanks for your reply

i select Viewport but is not working.

Thanks for your reply.

This method is not useful for me.

i want select viewport,then should be change in View crop region boundary as per given data.

You should show what you have done already or tried if you want help. No one wants to do someone else’s work for them without pay. You should also provide either an example or sample because people are not likely to set up an entire project to create a graph for you.


If you are looking to set just a box as the crop region, .CropBox property would work. If you have a more intricate shape, ViewCropRegionShapeManager Class might be necessary. It sounds like you just want a box around the element, so use CropBox, which needs a boundingbox as the input.

Like I said before, get the boundingbox of the element you want, move the min and max point 200 away, and create a new boundingbox using those points. Then feed it into CropBox (this would be done in Python and would require converting to Revit type).

I haven’t looked at many custom packages but Clockwork has a View.ResizeCropBox that you might be able to use, as long as the crop region is already there at the size of the object.


Thanks heap for helping in there.

Please see image attached, i have done like this.

Now problem is as shown in red circle when we select L1 we get only 1 view in List (see green circle) whereas i want all 4. Please suggest what changes to implemented. I have tried by removing 3D view but still it doesn’t work.

1 Like

In the graph, you are asking to apply a cropbox to several different types of views using 1 surface.

The surface you are using is a side of a wall, right? Cropboxes are not allowed for 3D views, so view #4 is going to fail. I am assuming your other views are not valid views for this specific surface.

The only view where the surface is visible and a cropbox is possible is in the elevation view, view #3. The other views failed because a cropbox using that surface is not possible. This is why only one view is shown in the green circle.

At least this is all I can gather from that picture. What are you hoping for with all 4 views? You can’t expect a 3D view to get a crop region, especially off of a single surface (which is only 2 dimensions). As a side note, sectionbox is different from crop region, if you are trying to set a section box in the 3d view.

Hey Mate

I’ve tried removing 3D now. The problem is when i select vertical surface (red circle) i am not getting view (green circle). Surface is shown for your reference only (blue circle). We are getting desired view when we select horizontal surface problem occurs only when we select vertical.

Sorry I left the office already so can’t check until tomorrow but double check the orientation of the surface to the view.

Hi Buddy…

Good morning…

As shown in image i have worked to set boundary in square shape but now i want to set boundary parallel to wall. Can you please help to set this up. I guess that’s why i wasn’t getting view yesterday.

Unfortunately boundingboxes (as far as I know API-wise) cannot be rotated. They are stuck in that orientation.

If you want a box parallel to the wall, you could take the curve/line of the wall location, offset it half the thickness in each direction, and connect the end points.

Thanks mate for that suggestion. I have done as per that.

Now the problem is i have input 2 separate surface of 2 separate walls which are on same plane but i am getting only single out put. Can you help me on that.

You can only have one cropbox active on a view. Feeding it two boxes for one view will just make only the last one show. What are you hoping to get here?

Hi . I would like the revit to take correct crop boundary while developing elevation.
For eg - It should take outer edge of wall line, floor and ceiling, so that the line thickness is seen and not hidden.
I have to offset the boundary by 0.4" every time to achieve this. Is there any alternative with Dynamo?