Author Topic: Command Viewer  (Read 2925 times)

0 Members and 1 Guest are viewing this topic.

Ron Heigh

  • Guest
Command Viewer
« on: July 05, 2004, 11:14:12 AM »
Is there any program I can run beside AutoCAD that will show me all of the commands in a list that are called during a session?
ie.
VLR-COMMANDWILLSTART= #####
VLR-COMMANDENDED= #####
VLR-COMMANDCANCELLED= #####
etc...

I want this to better understand the reactor process and the most efficient way to implement it.

SpeedCAD

  • Guest
Re: Command Viewer
« Reply #1 on: July 05, 2004, 11:29:57 AM »
Quote from: Ron Heigh
Is there any program I can run beside AutoCAD that will show me all of the commands in a list that are called during a session?
ie.
VLR-COMMANDWILLSTART= #####
VLR-COMMANDENDED= #####
VLR-COMMANDCANCELLED= #####
etc...

I want this to better understand the reactor process and the most efficient way to implement it.


Hi...

Yes, but from VB is better...

Ron Heigh

  • Guest
Command Viewer
« Reply #2 on: July 05, 2004, 12:20:29 PM »
Where can I learn about VB reactors?
What program do you use to see the commands called?

SpeedCAD

  • Guest
Command Viewer
« Reply #3 on: July 05, 2004, 12:50:01 PM »
Quote from: Ron Heigh
Where can I learn about VB reactors?
What program do you use to see the commands called?


Hi...

Your question is about see a list of command that you use, then DCL it can't, VBA it can't. Why? because while a DCL or UserForm is active it does not allow to operate in AutoCAD.

Nevertheless, from VB it is possible to be had an open form and to be worked with AutoCAD. In VB you must reference a type library of AutoCAD and work with Event of AutoCAD, for example, AcadDocument:
Code: [Select]
Private Sub AcadDocument_BeginCommand(ByVal CommandName As String)

End Sub


The CommanName variable is the command name initialized.

SMadsen

  • Guest
Command Viewer
« Reply #4 on: July 05, 2004, 01:55:14 PM »
There's a predefined callback function in AutoLISP that will show the arguments when an event is fired, as well as the event itself. It's called VLR-TRACE-REACTION and can be used where you would use any other callback function, e.g.

(vlr-command-reactor nil '((:VLR-commandWillStart . vlr-trace-reaction)))
#<VLR-Command-Reactor>

Command: LINE
; Reaction: :VLR-commandWillStart; argument list: (#<VLR-Command-Reactor> ("LINE"))
Specify first point: ... etc...

You can create as many reactors as you want with this callback function to examine when events are fired and what they return.