Author Topic: BeginCommand event question  (Read 1903 times)

0 Members and 1 Guest are viewing this topic.

Guest

  • Guest
BeginCommand event question
« 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?

Keith™

  • Villiage Idiot
  • Seagull
  • Posts: 16899
  • Superior Stupidity at its best
Re: BeginCommand event question
« Reply #1 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.
Proud provider of opinion and arrogance since November 22, 2003 at 09:35:31 am
CadJockey Militia Field Marshal

Find me on https://parler.com @kblackie

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4075
Re: BeginCommand event question
« Reply #2 on: November 20, 2006, 12:38:48 PM »
What are you trying to do?  Maybe we can help
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

mohnston

  • Bull Frog
  • Posts: 305
  • CAD Programmer
Re: BeginCommand event question
« Reply #3 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.
« Last Edit: November 21, 2006, 12:59:44 PM by mohnston »
It's amazing what you can do when you don't know what you can't do.
CAD Programming Solutions

Guest

  • Guest
Re: BeginCommand event question
« Reply #4 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!