I got something working but still not sure what is right.
Why is the CentrePoint a 2D Point???
From where is the Clipping distances taking from?
Public Sub ZoomZoom(ByVal pLookAt As Point3d, ByVal pLookFrom As Point3d, ByVal dWidth As Double, ByVal dHeight As Double)
Dim acDoc As Document = Application.DocumentManager.MdiActiveDocument
Dim acCurDb As Database = acDoc.Database
Using acTrans As Transaction = acCurDb.TransactionManager.StartTransaction()
'' Get the current view
Using acView As ViewTableRecord = acDoc.Editor.GetCurrentView()
acView.Width = dWidth
acView.Height = dHeight
acView.CenterPoint = Point2d.Origin
acView.ViewDirection = pLookAt.GetVectorTo(pLookFrom)
acView.Target = pLookAt
'acView.FrontClipAtEye = True
acView.BackClipDistance = -500
acView.BackClipEnabled = True
acView.FrontClipDistance = 500
acView.FrontClipEnabled = True
'' Set the current view
acDoc.Editor.SetCurrentView(acView)
End Using
'' Commit the changes
acTrans.Commit()
End Using
End Sub