Crop Region Size Parameter Edit by view



i`m trying to edit the parameters so as to make all the views with 3 mm annotation crop for example !!
is there any way ?

How do i Resize a Crop Box

Hi @Ahmed_Salah1

There is a node from @T_Pover MepOver package called View.SetCropBoxCurves you could use that to set.


@Kulkul the crop region i dont want to change im controlling it through scope box i want to change all the annotation crop offset only to be for example 3 mm !


@Ahmed_Salah1 Sorry i thought your looking to set view crop boundary. You need to access revit api


@Kulkul Thanks but i dont think i can write a code yet im still learning , so i will wait someone to help me but Thank you to provide half of the solution .


Hi Ahmed,

You can use this code to set the annotation crop size:

import clr
from Autodesk.DesignScript.Geometry import *

import clr
import Autodesk.Revit.DB

import clr
import Revit

import DSCore
from DSCore import *

import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument

# Import ToProtoType, ToRevitType geometry conversion extension methods

#The inputs to this node will be stored as a list in the IN variables.
if isinstance(IN[0], list):
	views = UnwrapElement(IN[0])
	views = [UnwrapElement(IN[0])]
size = IN[1]
listout = []
for view in views:
	regionMan = view.GetCropRegionShapeManager()
		regionMan.BottomAnnotationCropOffset = size
		regionMan.LeftAnnotationCropOffset = size
		regionMan.RightAnnotationCropOffset = size
		regionMan.TopAnnotationCropOffset = size

#Assign your output to the OUT variable.
OUT = listout

The size must be supplied in feet, so if you’re a metric guy (like me) then divide by 304.8 like in this example:


@T_Pover you helped me twice this morning , Thanks


Thank you T_Pover, for this piece of code


This just saved me several hours worth of work. Thank you!