OK, I have tried to research the help files, and the NG, but I have yet to
determine why when I create a named view via:
Set viewObj = ThisDrawing.Views.Add("currentview")
The view thats created does not have the same view as if I did it from the
command prompt.
-view;s;currentview; <---------------This is the outcome I want
I just want the current view to be created. It seams the center point is
always different.
I know I can simply use the send command, but I do not wish to. I know you
can define a center point, but how can this be done if your view changes all
the time. The location will be determined as the user initiate the macro,
then I wish to run some code, and return the user to where they started.
Then the view is deleted, so it is not a permanent.
This doesn't work:
Code:Sub test_view() Dim viewObj As IAcadView2 Dim dCPt(1) As Double Dim vCtr As VariantDim vSize As String vCtr = ThisDrawing.GetVariable("viewctr") vSize = ThisDrawing.GetVariable("viewsize") dCPt(0) = vCtr(0)dCPt(1) = vCtr(1) Set viewObj = ThisDrawing.Views.Add("TEST") With viewObj Center = dCPt End With End Sub
??????
Thanks for clearing this up,
Dan


Reply With Quote