Realtime Zoom from Macro

Realtime Zoom from Macro

Anonymous
Not applicable
375 Views
3 Replies
Message 1 of 4

Realtime Zoom from Macro

Anonymous
Not applicable
Is it possible to perform a realtime zoom while in a Macro.

I have a macro and want to be able to zoom in & out while the macro is still running.

I tried:

Me.Hide
Application.ZoomAll
Application.ZoomPickWindow
Me.Show

I'd rather do a realtime zoom, but the only way I can think of to do it is:

Me.Hide
ThisDrawing.SendCommand ("z" & vbCr & vbCr)
Me.Show

but this doesnt work either. The Me.Show brings sets focus back to the Macro before I have a chance to perform the zoom.
0 Likes
376 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
You normally need to regen the drawing to show the updates:

[code]
' The following example regenerates the complete drawing
ThisDrawing.Regen acAllViewports
' The following example regenerates the active viewport in the current
drawing
ThisDrawing.Regen acActiveViewport
[/code]

--
Phil Custer II, P.E.
Custer Services, Inc.
custer@landfillgas.com

wrote in message news:5087744@discussion.autodesk.com...
Is it possible to perform a realtime zoom while in a Macro.

I have a macro and want to be able to zoom in & out while the macro is still
running.

I tried:

Me.Hide
Application.ZoomAll
Application.ZoomPickWindow
Me.Show

I'd rather do a realtime zoom, but the only way I can think of to do it is:

Me.Hide
ThisDrawing.SendCommand ("z" & vbCr & vbCr)
Me.Show

but this doesnt work either. The Me.Show brings sets focus back to the
Macro before I have a chance to perform the zoom.
0 Likes
Message 3 of 4

Anonymous
Not applicable
I'm not worried about the Regen. It works as I have it now, but I'd rather the user perform a realtime zoom instead of a zoom all then zoom window.
0 Likes
Message 4 of 4

Anonymous
Not applicable
Can you add a loop before Me.Show checking whether AcadApplication.GetAcadState.IsQuiescent = true.

Regards - Nathan
0 Likes