Discussion:
Problam of Closing exexute threads in test stand from c# code
(too old to reply)
yaniva
2008-08-05 06:10:13 UTC
Permalink
Hi
 
I want to close my .net application therefor i need to close all test stand resource. to do so im using the follow lines:

axApplicationMgr1.CloseAllExecutions();
axSequenceFileViewMgr1.GetCommand(CommandKinds.CommandKind_Exit).Execute(false);
axApplicationMgr1.GetEngine().UnloadAllModules();
It dosent seem to be helpfull, because sometime after the application closed the proccess is still exist (i can see it in the windows task manager)
any idea how can i close my application and test stand togther?
yaniv
 
Jervin_J
2008-08-12 14:40:31 UTC
Permalink
Hi yaniv,
 
Typically, you can simply call <a href="http://zone.ni.com/reference/en-XX/help/370052G-01/tsuiref/reftopics/applicationmgr_shutdown_m/" target="_blank">ApplicationMgr.Shutdown()</a>.
&nbsp;
This will close all opened sequences and executions. If it returns true, you can exit out of the application and if it returns false, you can wait for an ExitApplication event to get generated at which point you can close the application.
&nbsp;
For an example on how to do this, please refer to the C# Simple Operator Interface that ships with TestStand.
Loading...