Consulting

Results 1 to 4 of 4

Thread: Macro help for Autocad

  1. #1
    VBAX Newbie
    Joined
    Apr 2014
    Posts
    4
    Location

    Macro help for Autocad

    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?

  2. #2
    Moderator VBAX Master Tommy's Avatar
    Joined
    May 2004
    Location
    Houston, TX
    Posts
    1,184
    Location
    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

  3. #3
    VBAX Newbie
    Joined
    Apr 2014
    Posts
    4
    Location
    Thanks Tommy I will check it out tomorrow and let you know how it goes.

  4. #4
    VBAX Newbie
    Joined
    Jul 2014
    Posts
    1
    Location
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •