NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I Enable Tracing on .net

Im want to enable tracing in my sequence.
 
i tried the follow code:
 

axSequenceFileViewMgr1.GetCommand(

CommandKinds.CommandKind_TracingEnabled).Execute(false);

but its not working, is there is any other way?

thanks

Yaniv

0 Kudos
Message 1 of 4
(3,481 Views)

That code is roughly equivalent to:

Engine.StationOptions.TracingEnabled = !Engine.StationOptions.TracingEnabled;

Thus it toggles the global tracing flag. Some possible reasons you might not be tracing include:

- tracing was already on, and you just turned it off

- tracing might be off due to a finer grained option. See Execution.TracingDisabled, SequenceContext.Tracing, and the Step Properties >> Run Options >> Sequence Call Trace Setting on sequence call steps.

- Your UI might have been customized in a way that breaks tracing

 

-  James

 

 

0 Kudos
Message 2 of 4
(3,459 Views)

Thank you james for your help

another question how can i change the number of socket in the model option.

right now im change the config ini file named: TestStandModelModelOptions.ini.

its work fine, but i would like to do it through the .net code.

thanks

yaniva

0 Kudos
Message 3 of 4
(3,446 Views)
Hi yaniva,
 
If you want to modify the number of test sockets programatically for a sequence file, you can try to modify the Parameters.ModelOptions.NumTestSockets property. Normally you want to do this by overriding the ModelOptions callback of the sequence file.
 
Programatically from the OI, you can do this by adding a TestStand button to the user interface and connect it to the right entry point (Configure Model Options).
For example, I added a TestStand Button to my UI called configButton and call:
axExecutionViewMgr.ConnectCommand(ConfigButton, CommandKinds.CommandKind_ConfigurationEntryPoints_Set, 2, 0);
Refer to the TestStand Help for more information on these functions and parameters.
What this does is basically write the options to the TestStandModelModelOptions.ini file.
 
Alternatively, you could simply add a button that calls DisplayModelOptionsDialog from modelsupport2.dll.
This pops up the same dialog, however, I recommend the former method because that handles a lot of things behind the scenes that you would have to implement yourself.
 
Also, for future reference, for separate issues you are probably best off creating a new thread. This lets you title the thread something relevant to your question so that people who know about that can see it from the board's main page.
Jervin Justin
NI TestStand Product Manager
0 Kudos
Message 4 of 4
(3,424 Views)