How to emulate "MVIEW" "off"

Discussion in 'AutoCAD' started by tsigwing, Mar 16, 2005.

  1. tsigwing

    tsigwing Guest

    What I am trying to do is when you issue the command to switch layouts, before you get there to turn off all viewports, do some stuff and turn on all of the viewports.

    I've got everything working, but I had to use the following:

    Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)

    If CommandName = "LAYOUT_CONTROL" Then
    ThisDrawing.SendCommand "MVIEW" & Chr(13) & "OFF" & Chr(13) & "ALL" & Chr(13) & Chr(13) & "yes" & Chr(13)
    End If
    End Sub


    I tried to use .viewporton = False and cycle through all of the viewports, but it didn't like this. Whats the more elegant solution?
     
    tsigwing, Mar 16, 2005
    #1
  2. tsigwing

    Jeff Mishler Guest

    Cycle through the Viewports and use the Display method....
     
    Jeff Mishler, Mar 16, 2005
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.