Turn on annotation crop with C#

I used some Python I found on here and translated it… But it doesn’t seem to actually turn on the Annotation Crop.

            planView.CropBox = cropBox;
            planView.CropBoxActive = true;
            planView.CropBoxVisible = true;

            var regionMan = planView.GetCropRegionShapeManager();
            regionMan.LeftAnnotationCropOffset = 0.01; 
            regionMan.RightAnnotationCropOffset = 0.01;
            regionMan.TopAnnotationCropOffset = 0.01;
            regionMan.BottomAnnotationCropOffset = 0.01;

There’s a method to turn on the crop, to turn on the visibility of the crop and the annotation crop (once I manually turn it on) is the correct size… But how do I turn on the Annotation crop using the code?

I ticked this manually but I want the code to tick it.
image

oooo… I found it!!

planView.get_Parameter(BuiltInParameter.VIEWER_ANNOTATION_CROP_ACTIVE).Set(1);

For any built in parameter I would suggest you have this as your go to reference :slight_smile:

BuiltInParameter Enumeration