VP object not regerated with code.

VP object not regerated with code.

Anonymous
Not applicable
133 Views
0 Replies
Message 1 of 1

VP object not regerated with code.

Anonymous
Not applicable
I create a viewport on my layout, and I can't get the newly created VP
to regenerate with my code, maybe I'm not using the right code?

If I manually return to the layout (after the code ends) and do a Regen All,
it does get regererated.

Can someone help me.

Here is part of the code.

Thanks.

Set vp = doc.PaperSpace.AddPViewport(dblpt, vpSizeX, vpSizeY)
vp.Display True
vp.Update
With doc
.Application.ZoomExtents
.Regen acActiveViewport
.mSpace = True
.ActivePViewport = vp
.Application.ZoomExtents
.Application.ZoomScaled 1 / (dwgScale / 1000),
acZoomScaledRelativePSpace
.mSpace = False
.ActiveSpace = acPaperSpace
.Regen acAllViewports
.ActiveSpace = acModelSpace
.Application.ZoomExtents
End With

Application.Update
0 Likes
134 Views
0 Replies
Replies (0)