Message 1 of 2
CropBox bounding box
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I need to find the crop box bounding box.
In the API docs here:
Revit Api doc / View Class / CropBox
It's mentioned that:
If I don't use the transform, the Min and Max values are incorrect. Should I use the transform, or is there a different way to convert the bounding box?
Is the transform ignored only for the case when I 'set' the CropBox property?
if (curView.CropBox.IsSet && curView.CropBoxActive)
{
Transform cbTransform = curView.CropBox.Transform;
XYZ cbMaxBefore = curView.CropBox.Max;
XYZ cbMinBefore = curView.CropBox.Min;
XYZ cbMaxAfter = cbTransform.OfPoint(cbMaxBefore);
XYZ cbMinAfter = cbTransform.OfPoint(cbMinBefore);
}
The values:
cbMaxBefore = {(-254.965806570, 57.461380770, 3.180839895)}
cbMinBefore = {(-260.558644724, 50.482283586, -996.719160105)}
cbMaxAfter = {(-220.958274536, 51.273583119, 77.983989501)}
cbMinAfter = {(-226.551112691, 44.294485935, -921.916010499)}
The model is attached.
The view is : 7(1) - Callout 2