I have an existing viewport (viewport1) on paperspace.
Viewport1.ViewDirection = Autodesk.AutoCAD.Geometry.Vector3d.ZAxis
I am trying to create a new viewport (viewport2) that is placed above it and to have the same properties except twist angle.
But I fail because of viewtarget.
The view is not pointing to the same point.
Can somebody corrects me?
Dim Viewport2 As New Viewport Viewport2.SetDatabaseDefaults() Viewport2.CenterPoint = New Point3d(Viewport1.CenterPoint.X, Viewport1.CenterPoint.Y + 10 + Viewport1.Height, 0) Viewport2.Height = Viewport1.Height + 10 Viewport2.Width = Viewport1.Width + 10 Viewport2.ColorIndex = 1 Viewport2.ViewDirection = Autodesk.AutoCAD.Geometry.Vector3d.ZAxis Viewport2.ViewTarget = Viewport1.ViewTarget Viewport2.ViewCenter = Point2d.Origin Viewport2.TwistAngle = pi/2 PaperSpace.AppendEntity(Viewport2) Trans1.AddNewlyCreatedDBObject(Viewport2, True) Viewport2.On = True Viewport2.CustomScale = Viewport1.CustomScale Viewport2.Locked = True
Solved! Go to Solution.
Solved! by Predator_mpm. See the answer in context.
Access a broad range of knowledge to help get the most out of your products and services.