How to emulate "MVIEW" "off"
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
How to emulate "MVIEW" "off"

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
tsigwing
Guest





Posted: Wed Mar 16, 2005 9:09 pm    Post subject: How to emulate "MVIEW" "off" Reply with quote

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?

Back to top
Jeff Mishler
Guest





Posted: Wed Mar 16, 2005 10:53 pm    Post subject: Re: How to emulate "MVIEW" "off" Reply with quote

Cycle through the Viewports and use the Display method....

--
Jeff
check out www.cadvault.com
"tsigwing" <nospam@address.withheld> wrote in message
news:32291749.1110989400844.JavaMail.jive@jiveforum2.autodesk.com...
Quote:
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?
Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB