Calling VB .dll Activex plugin directly from AutoCAD

Discussion in 'AutoCAD' started by John_Doe, Apr 13, 2005.

  1. John_Doe

    John_Doe Guest

    I initially developed plugin in VBA. I would load it in the Startup
    Suite, and to call it from user interface I added the line in the menu:

    oPopup.AddMenuItem 21, "ECCAD plugin", "-vbarun
    ThisDrawing.ECCADStartPoint" & vbCr

    (ECCADStartPoint() is the "main()" function in my plugin)

    I recently ported everything to VB ActiveX dll but I still call it from
    VBA plugin like this:

    Sub ECCADStartPoint()
    On Error GoTo errhandler

    ' ABSECCAD is a COM object exposed in my VB ActiveX DLL
    Dim a As New ABSECCAD

    a.main ThisDrawing, AecbApplication

    Exit Sub

    errhandler:
    MsgBox "Unknown error in ECCADStartPoint !", vbCritical, "ECCAD
    plugin error"

    End Sub

    As you can see I need to pass ThisDrawing and AecbApplication to my DLL
    as a parameters

    It all works as expected, but I would like to get rid of VBA plugin
    completely because it's not needed anymore - it is only used to to call
    my ActiveX DLL and pass parameters to it.

    How would I do this directly from the AutoCAD menu? Is it even
    possible? I tried searching knowledge base but didn't find anything
     
    John_Doe, Apr 13, 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.