Rotate a viewplan after creation
Hi
I am trying to rotate the crobox of a view after creation, this means that I create the view and then activates the cropbox and makes it visible. Then I create a Boundingbox of the crop box. This box I get the rotation of and transforms.
The transformation is applied to the boundingbox, but when I uses this boundingbox as crop box on my view, the translation is back to the indentity matrix. This means that the translation is not applied.
codesnippet:
ViewPlan rotatetView = doc.GetElement(viewToDuplicate.Duplicate(ViewDuplicateOption.AsDependent)) as ViewPlan;
rotatetView.CropBoxActive = true;
rotatetView.CropBoxVisible = true;
BoundingBoxXYZ box = rotatetView.CropBox;
XYZ originOfRotation = (box.Max - box.Min) / 2;
XYZ axizOfRotation = XYZ.BasisZ;
Transform rotate = Transform.get_Rotation(originOfRotation, axizOfRotation, 180);
box.Transform = box.Transform.Multiply(rotate);
rotatetView.CropBox = box;
Any ideas how to fix this?
My goal is to create a set of rotated (userspesific angle) dependendt viewplans to be used to create fireplans.