Message 1 of 1
VP object not regerated with code.

Not applicable
12-10-2002
09:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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
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