01-11-2008 10:47 AM
01-11-2008 04:44 PM
01-11-2008 05:06 PM - edited 01-11-2008 05:16 PM
Events are already fired to the UI. Specifically, ApplicationMgr.PreCommandExecution and ApplicationMgr.PostCommandExecute fire when any command is invoked.
The Command object is passed as a parameter to the event handler. For SinglePass, the Command.EntryPoint is equal to 1 (Test UUTs would be 0), and Command.Kind is equal to CommandKind_RunEntryPoint (this is from memory, but it should be close).
Note that you will get this event whether the command is executed from a button, a menu item, or from your own code.
Also note that in LabVIEW, you should generally handle ActiveX control events with a callback VI (as is done in the source code for the example LV User Interfaces), not an event structure. If necessary, your callback can use a LabVIEW mechanism to then trigger a case in an event structure. I'm not a LabVIEW expert, but I'm sure you could use something like a queue or an occurrance. Maybe you can even fire event structure cases directly?
If the piece of code that wants to handle these events doesn't have access to the ApplicationMgr control, then refer to:
http://forums.ni.com/ni/board/message?board.id=330&message.id=17162#M17162
01-12-2008 06:23 PM
Thanks guys.
I ended up using a standard Labview Button to trigger my Event Structure and simultaneously start TestStand using the "Do Click" Method of the SinglePass button.
01-14-2008 01:18 AM
01-14-2008 09:33 AM