programing events in VBA

Discussion in 'AutoCAD' started by fatorial, Mar 17, 2005.

  1. fatorial

    fatorial Guest

    How can I do to load a macro with events automatically? I maked a macro with beginsave event and this one only works if I write the code into AutoCAD Object folder in the IDE.

    This is the code:

    Private Sub AcadDocument_BeginSave(ByVal FileName As String)
    Call AutoDWF
    MsgBox "O DWF has create successful! "
    End Sub
    Public Sub AutoDWF()

    Dim objPlot As Object
    Set objPlot = ThisDrawing.Plot

    Dim blnRet As Boolean
    Dim sDWFFile As String
    Dim sPlotDriver As String
    sDWFFile = "c:\ari\Facility01.dwf"
    sPlotDriver = "c:\ari\DWF6 ePlot.pc3"
    blnRet = objPlot.PlotToFile(sDWFFiPOST /post!post.jspa HTTP/1.0
    Via: 1.0 SKYSERVER
    Content-Length: 856
    Content-T
     
    fatorial, Mar 17, 2005
    #1
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.