Community
Hello,
I have this code:
Matrix3d cur = ed.CurrentUserCoordinateSystem; Vector3d x = new Vector3d(1, 0, 0); Vector3d y = new Vector3d(0, 1, 0); Point3d o = new Point3d(0, 0, 0); if (cur.CoordinateSystem3d.Xaxis == x & cur.CoordinateSystem3d.Yaxis == y & cur.CoordinateSystem3d.Origin == o) { Point3d center = (Point3d)Application.GetSystemVariable("VIEWCTR"); double viewsize = (double)Application.GetSystemVariable("VIEWSIZE"); Matrix3d newUcsMat = Matrix3d.AlignCoordinateSystem(new Point3d(0, 0, 0), new Vector3d(1, 0, 0), new Vector3d(0, 1, 0), new Vector3d(0, 0, 1), new Point3d(0, 0, 0), new Vector3d(0, 1, 0), new Vector3d(-1, 0, 0), new Vector3d(0, 0, 1)); ed.CurrentUserCoordinateSystem = newUcsMat; Utilities.Command("PLAN", "C"); Utilities.Command("ZOOM", "C", center.TransformBy(ed.CurrentUserCoordinateSystem), viewsize);
Code is rotating well my model, but it's zooming to bad point.
I want to zoom to the point from previous view, so I'm transforming it by new UCS - unfortunately something is going wrong (it's not this point what I want).
Can anyone help me?
Sorry for the delay.
If you continue have this issue, can you please share a drawing and a sample project to demonstrate the issue.
Also, an explanation of the point to which you are trying to zoom-in would help.