Calling VB .dll Activex plugin directly from AutoCAD
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Calling VB .dll Activex plugin directly from AutoCAD

 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA
Author Message
Guest






Posted: Tue Apr 12, 2005 11:04 pm    Post subject: Calling VB .dll Activex plugin directly from AutoCAD Reply with quote

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

Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> VBA All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB