TheSwamp

Code Red => VB(A) => Topic started by: Guest on November 17, 2006, 11:29:24 AM

Title: BeginCommand event question
Post by: Guest on November 17, 2006, 11:29:24 AM
I have a macro ("^P^C^C_-vbarun Print_Manager.dvb!modMain.Main; ").  How can I capture that using the AcadDocument_BeginCommand event?  Or is it possible to capture the Print_Manager.dvb!modMain.Main portion of the macro?  Is it NOT possible?
Title: Re: BeginCommand event question
Post by: Keith™ on November 17, 2006, 11:15:45 PM
VBA commands do not fire the "BeginCommand" event. If you need to do something before the command is started, I would suggest you simply code the command in VBA and allow it to call the plotting routine.
Title: Re: BeginCommand event question
Post by: David Hall on November 20, 2006, 12:38:48 PM
What are you trying to do?  Maybe we can help
Title: Re: BeginCommand event question
Post by: mohnston on November 21, 2006, 12:56:23 PM
Try putting a messagebox in the BeginCommand event and then run your macro.

Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)
   MsgBox CommandName
End Sub

-vbarun is not a VBA command

You might also look at the BeginLisp event.
Launch your macro from a lisp function and you will have an event that will tell you when your vba function is being run.
Title: Re: BeginCommand event question
Post by: Guest on November 21, 2006, 01:55:06 PM
Quote
You might also look at the BeginLisp event.

I missed that one.  I'll have a look.

Thanks!