I have a command that create a viewport by selecting the zone in object. It's working fine except when UCS is not general and plan is set to current (see image).
The code is quite long so I'll put here just the part where I create the viewport.
What would be the parameter of the viewport to determine the center and the right angle (I thought it was CenterPoint and twistangle but it doesn't seem to work) ?
I'll put more info if it's not clear enought. Thank you !
Viewport vp = new Viewport();
vp.SetDatabaseDefaults();
//vp.CenterPoint = new Point3d(positionMV.X + 200, positionMV.Y + 200, positionMV.Z);
vp.CenterPoint = positionMV;
vp.Width = distanceX;
vp.Height = distanceY;
vp.ViewCenter = ptMVsup;
vp.Locked = true;
//vp.TwistAngle = 15;