How to find outL: View in Modelspace or layout

How to find outL: View in Modelspace or layout

Anonymous
Not applicable
274 Views
4 Replies
Message 1 of 5

How to find outL: View in Modelspace or layout

Anonymous
Not applicable
I'm writing a routine for out plotter and I want to know if a view is in
modelspace or in paperspace (e.q. layout)

The view object hasn't this propertie. Does anyone know how to find out in
VBA?

TIA

Erik
0 Likes
275 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Actually neither.

Layouts is a object group that is on the same level as the Views group. ie,
they're both under the Document object.
soo..
AutoCADApplication.ActiveDocument.View()

see: ActiveX and VBA Developer's Guide Help file. Goto Chapter 2, and then
Goto Uderstanding ActiveX Automation Basics.
This will give you a chart of the application object.

Ricky

<>
I want to know if a view is in
> modelspace or in paperspace (e.q. layout)
<>
0 Likes
Message 3 of 5

Anonymous
Not applicable
Well...I do know what the layouts and View object groups are but if Autocad
knows if a view is a modelspace view there must be a way to find out in VBA
isn't it?

For example: It isn't possible to plot a modelspace view from another layout
then the modelspace layout. When you enter the plot dialog AutoCAD doesn't
show the modelspace views in the other layouts.

Any clues?

"Ricky M. Medley" schreef in bericht
news:179CCDC72443F09B59D232FD44CF0456@in.WebX.maYIadrTaRb...
> Actually neither.
>
> Layouts is a object group that is on the same level as the Views group.
ie,
> they're both under the Document object.
> soo..
> AutoCADApplication.ActiveDocument.View()
>
> see: ActiveX and VBA Developer's Guide Help file. Goto Chapter 2, and
then
> Goto Uderstanding ActiveX Automation Basics.
> This will give you a chart of the application object.
>
> Ricky
>
> <>
> I want to know if a view is in
> > modelspace or in paperspace (e.q. layout)
> <>
>
>
0 Likes
Message 4 of 5

Anonymous
Not applicable
The AutoCAD system variable CVPort will only be equal to 1 when you are
truly located in PaperSpace. If you are within a PViewport, i.e. MSpace, the
CVPort will be greater than one, even though ActiveSpace indicates
PaperSpace.


--
R. Robert Bell, MCSE
www.AcadX.com


"Erik Droog" wrote in message
news:624DBC6822174F3BDF59B81370F73372@in.WebX.maYIadrTaRb...
| Well...I do know what the layouts and View object groups are but if
Autocad
| knows if a view is a modelspace view there must be a way to find out in
VBA
| isn't it?
|
| For example: It isn't possible to plot a modelspace view from another
layout
| then the modelspace layout. When you enter the plot dialog AutoCAD doesn't
| show the modelspace views in the other layouts.
|
| Any clues?
|
| "Ricky M. Medley" schreef in bericht
| news:179CCDC72443F09B59D232FD44CF0456@in.WebX.maYIadrTaRb...
| > Actually neither.
| >
| > Layouts is a object group that is on the same level as the Views group.
| ie,
| > they're both under the Document object.
| > soo..
| > AutoCADApplication.ActiveDocument.View()
| >
| > see: ActiveX and VBA Developer's Guide Help file. Goto Chapter 2, and
| then
| > Goto Uderstanding ActiveX Automation Basics.
| > This will give you a chart of the application object.
| >
| > Ricky
| >
| > <>
| > I want to know if a view is in
| > > modelspace or in paperspace (e.q. layout)
| > <>
| >
| >
|
|
0 Likes
Message 5 of 5

Anonymous
Not applicable
Mr. Droog,
I reread your original post from differing perspectives and thought you
meant slightly different thing each time. If Mr. Bell's response was not
what you needed, I would hate for you to not get an answer. ; Try posting
code if this is the case....

I have looked at the object acadview and see no vba item that would indicate
which space it...."points to".
This is a common shortcomming of vba with autocad; in that VisualLISP still
remains the best programming front (in my opinion).

On the other hand...I did notice that the .Target property of the a
PaperSpace (or "Layout" should I say) view will always be all zeros. Target
is an array. So if all are 0, then you have yourself a paperspace viewport.

I can't however find any difference between views of different layout tabs;
But yet AutoCAD can still seem to pull the right one up when making current.

Ricky


"Erik Droog" wrote in message
news:624DBC6822174F3BDF59B81370F73372@in.WebX.maYIadrTaRb...
> Well...I do know what the layouts and View object groups are but if
Autocad
> knows if a view is a modelspace view there must be a way to find out in
VBA
> isn't it?
<>
0 Likes