Guest
|
Posted:
Tue Apr 12, 2005 11:04 pm Post subject:
Calling VB .dll Activex plugin directly from AutoCAD |
|
|
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
|
|