Hmm,
Not getting past this line:
vCtr = ThisDrawing.GetVariable("viewctr")
What am I doing wrong here?
This is a start, not finished yet obviously, but I am trying to incorporate
the view center,
and I am not sure about how to define the current view size.
Thanks,
Dan
Sub test_view()
Dim viewObj As IAcadView2
Dim dCPt(1) As Double
Dim vCtr As String
Dim vSize As String
vCtr = ThisDrawing.GetVariable("viewctr")
vSize = ThisDrawing.GetVariable("viewsize")
dCPt(0) = 6
dCPt(1) = 6
Set viewObj = ThisDrawing.Views.Add("TEST")
With viewObj
.Center = vCtr
'.Height = 4.5
'.Width = 4.5
End With
End Sub
"Jeff Mishler" wrote in message
news:41671ecb_1@newsprd01...
> Use ThisDrawing.GetVariable for both the "viewctr" & "viewsize" to set the
> Center & Height properties of the view. Be careful though, as the viewctr
> returns a 3d point and the Center property expects a 2d point.
>
> --
> Jeff
> check out www.cadvault.com
> "Dan" wrote in message
> news:41671adf$1_2@newsprd01...
> > Clarification-
> > I know I can simply use the send command, but I do not wish to. I know
> > you
> > can define a centerpoint, 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.
> >
> > Any ideas?
> > Thanks,
> > Dan
> >
> >
> > "Dan" wrote in message
> > news:4166f104$1_3@newsprd01...
> >> Ok, I have tried to reaserch the help files, and the NG, but I have yet
> >> to
> >> determine why when I create a namved 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 ceter point
is
> >> always different.
> >>
> >> ??????
> >>
> >> Thanks for clearing this up,
> >> Dan
> >>
> >>
> >
> >
>
>