Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Question on Mirror

Status
Not open for further replies.

hoja

Technical User
Dec 3, 2003
102
US
Hi, I wrote some code so that everytime someone hits the save button, a MsgBox pops up asking if he mirrored the drawing or not. If he clicks on yes, then a MsgBox pops up saying "Ok", but if the person clicks on "no" then I want the mirror command to take effect right away...how could I do that in my code. And also right now, whether you click on yes or no, the same "yes" msgbox comes up....like is not reading the If result = VbYes Then code line. Please advice. Thank you.

Private Sub AcadDocument_BeginSave(ByVal FileName As String)

MsgBox "Did you Mirror your tops?", vbYesNo
Dim result As VbMsgBoxResult
If result = vbYes Then
MsgBox "no"
Else
MsgBox "yes"
End If
End Sub
 
I have another question... Is there a way to tell if the "Mirror" command has been used with some kind of script? Let's say when you hit "save" the script checks to see if you used the "Mirror" command, and if not, then it will tell you that you haven't mirrored anything on your drawing, and if you want to mirro something right now.
 
OK, I GOT IT !!! I made it work...if anyone would like to see the code, just write back, it was simple after all.

Rod
 
Well I still haven't gotten the part where it actually checks to see if a certain command has been used in the current drawing. I would still appreciate help with that if it can be done....thank you.
 
I finally got this script to work, if anyone is interested let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top