NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically disable result recording

Solved!
Go to solution

I am creating a Visual Studio C# user application, and I want to disable result recording under certain circumstances.

 

I presently set the Application Manager engine.DisableResults to true in my Visual Studio application, but that changes the configured setting permanently (when I open TestStand Sequence Editor, the Configure | Station Options | Execution | Disable Result Recording for All Sequences is changed).

 

I am looking for a solution that can be called from my Visual Studio application that disables result recording before sequence execution begins, but does not change the state of the installed TestStand product.

0 Kudos
Message 1 of 5
(7,994 Views)

What version of TestStand are you using?

 

As of TestStand 2012, the process models use "Plugins" for generation of reports. You can disable/enable each installed plugin individually ("Configure >> Result Processing") and each NI provided plugin has a separate option to disable reporting.

Enabling plugins is something you have to do before you start to execute your test.

Enabling the "Disable Report" option for individual plugins is something you can do during test execution. The challenge you might face is to identify the correct plugin to set this option (e.g. you run database logging and a textual report. How do you make sure that you disable reporting only for the textual report, leaving database logging active?).

 

The lookup string for disabling specific plugins (if you provide that function with the plugin) would look like this:

RunState.Root.Locals.ModelPluginConfiguration.Plugins[<SelectedPluginID>].PluginSpecific.Options.DisableReportGeneration

 

You can implement this for instance in a callback function which is triggered by specific user messages.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 5
(7,945 Views)

Thanks for quick and detailed response Norbet_B.

 

I already have diabled reporting in the manner you described in your response.

 

I am looking to disable result recording.

 

I noticed that it can be disabled less globally than I initially thought with am Edit | Sequence Properties | Disable Result Recording for All Steps.

 

Does anyone know how to access this property through the API? I assume it would be accessed from the Engine.GetSequenceFileEx method.

0 Kudos
Message 3 of 5
(7,929 Views)
Solution
Accepted by topic author tempacheer

You have to be very precise on the objects you are handling. Otherwise, you will end up with some weird and unexpected behavior.

Did you have the chance to attend the NI TS 2 class?

If yes, please review the chapter about the TS API.

If no, i give you some hints:

- An object of type "Sequence File" contains (usually) one or more objects of type "Sequence"

- An object of type "Sequence" contains (usually) one or more objects of type "Step"

- Both the object "Sequence" and "Step" have a property which holds the information if TS should collect the result of the sequence/step.

- For Step it would be "ResultOption" (default 1, deactivate => 0)

- For Sequence it would be RecordResults (default TRUE, deactivate => FALSE)

 

Note that some properties of objects might be "hidden". You can activate display of hidden properties by configuring TS "Preferences >> Show Hidden Properties" checkbox.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 5
(7,895 Views)

Thanks for your quick response.

That got me where I needed to go!

0 Kudos
Message 5 of 5
(7,863 Views)