PDA

View Full Version : Macro help for Autocad



Jabman81
04-24-2014, 07:24 PM
Hi

I need help writing a simple (at least I think it will be simple) macro for Autocad. Ok what I want to be able to do is when I go to save a document (I usually use Save As) I want a message box to pop up to remind me to check my text block for errors. I can do the message box fine but not sure how to make it pop up when using save as, can someone help?

Tommy
04-28-2014, 08:27 AM
This will work but it will not stop the command.

Private Sub AcadDocument_BeginCommand(ByVal CommandName As String) If CommandName = "SAVEAS" Then
result = MsgBox("Did you Save your Text Box Info?", vbYesNo)
If result <> 6 Then '6 measn yes, do something here The command is now active and you cannot stop it.

End If
End If
End Sub

Jabman81
04-28-2014, 04:24 PM
Thanks Tommy I will check it out tomorrow and let you know how it goes.

Today
07-29-2014, 09:36 AM
Hi I need help with writing a script to copy 2 layer for 3600 AutoCAD drawing into a single new .dwg. I am using AutoCAD 2012 and was not able to download VBA manager.