ActiveLayout not activ?!!

ActiveLayout not activ?!!

Anonymous
Not applicable
409 Views
6 Replies
Message 1 of 7

ActiveLayout not activ?!!

Anonymous
Not applicable
Hy, here is my problem,

I make a new layout:

Set New_Lay = ThisDrawing.Layouts.Add("NewLayout")

I set it activ:

ThisDrawing.ActiveLayout = New_Lay

And then i make this:

Set PView = ThisDrawing.Paperspace.AddPViewport(Cen_Pt, Length, High)

The problem is, that the new PViewport is not im my Layout, it is in the
last activ
layout.

Why, is this a bug or should i make holidays?

Thank for every answer

Bernd
0 Likes
410 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
It is probably failing at:

ThisDrawing.ActiveLayout = New_Lay

Try this:

Set ThisDrawing.ActiveLayout = New_Lay




"Bernd Cuder" wrote in message
news:CA67701AB01BA65941A123643CD614A8@in.WebX.maYIadrTaRb...
> Hy, here is my problem,
>
> I make a new layout:
>
> Set New_Lay = ThisDrawing.Layouts.Add("NewLayout")
>
> I set it activ:
>
> ThisDrawing.ActiveLayout = New_Lay
>
> And then i make this:
>
> Set PView = ThisDrawing.Paperspace.AddPViewport(Cen_Pt, Length, High)
>
> The problem is, that the new PViewport is not im my Layout, it is in the
> last activ
> layout.
>
> Why, is this a bug or should i make holidays?
>
> Thank for every answer
>
> Bernd
>
>
0 Likes
Message 3 of 7

Anonymous
Not applicable
No, that is not the problem,

when i set the layout activ it is activ an visible, but in the

paperspace object is the last layout activ, so the viewport is

create there?

Bernd




"Rodrigo Prati" schrieb im Newsbeitrag
news:4148787B877096D025FB5111951FB6FB@in.WebX.maYIadrTaRb...
> It is probably failing at:
>
> ThisDrawing.ActiveLayout = New_Lay
>
> Try this:
>
> Set ThisDrawing.ActiveLayout = New_Lay
>
>
>
>
> "Bernd Cuder" wrote in message
> news:CA67701AB01BA65941A123643CD614A8@in.WebX.maYIadrTaRb...
> > Hy, here is my problem,
> >
> > I make a new layout:
> >
> > Set New_Lay = ThisDrawing.Layouts.Add("NewLayout")
> >
> > I set it activ:
> >
> > ThisDrawing.ActiveLayout = New_Lay
> >
> > And then i make this:
> >
> > Set PView = ThisDrawing.Paperspace.AddPViewport(Cen_Pt, Length, High)
> >
> > The problem is, that the new PViewport is not im my Layout, it is in the
> > last activ
> > layout.
> >
> > Why, is this a bug or should i make holidays?
> >
> > Thank for every answer
> >
> > Bernd
> >
> >
>
>
0 Likes
Message 4 of 7

Anonymous
Not applicable
... after setting your active layout, try setting mspace to false: (this
will ensure that you are in the paperspace portion of the layout)

ThisDrawing.Mspace = false
0 Likes
Message 5 of 7

Anonymous
Not applicable
ok -- i guess that didn't work.... try this?

Set PView = ThisDrawing.ActiveLayout.Block.AddPViewport(Cen_Pt, Length,
High)
0 Likes
Message 6 of 7

Anonymous
Not applicable
Thanks Lanny your code works fine, but i now know the problem:

I intialize every drawing in this

Set Pspace=ThisDrawing.Paperspace

When i create a new layout, the pspace object will not be actualize, so i
call

the set function again and it works.

Bernd



"Lanny Schiele" schrieb im Newsbeitrag
news:06DF460300E397E2863F9221EFAF7644@in.WebX.maYIadrTaRb...
> ok -- i guess that didn't work.... try this?
>
> Set PView = ThisDrawing.ActiveLayout.Block.AddPViewport(Cen_Pt, Length,
> High)
>
>
>
0 Likes
Message 7 of 7

Anonymous
Not applicable
Lanny, you're a genius!! This line of code, translated into vlisp, has
finally solved a problem of mine that I've been having for a long time!!
Just wanted to say thanks.
--
Bobby C. Jones
p.s. - Can anyone explain to me why the paperspace collection does not
always stay in sync with the current layout?? Is it a bug, or is it
designed specifically to confuse us?

"Lanny Schiele" wrote in message
news:06DF460300E397E2863F9221EFAF7644@in.WebX.maYIadrTaRb...
> ok -- i guess that didn't work.... try this?
>
> Set PView = ThisDrawing.ActiveLayout.Block.AddPViewport(Cen_Pt, Length,
> High)
>
>
>
0 Likes