NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Add/Configure a result processing entry programatically

I am setting up a sequence that will walk through a station setup.

 

One thing I want this to do is allow the user to select Results processing options and set them, one for the main results report and one or more for database entries.

 

Other than literally setting individual properties, is there are way to...

  1) Save a configured plugin

  2) Copy it to a new machine

 

Or maybe there's a better way to do this?  I know it's probably sitting in the teststand CFG folder, but that might not be the best option either.

0 Kudos
Message 1 of 6
(1,921 Views)

 

Hi Jed,

 

Go to results processing

In active configuration combo  ..go to last entry  "Manage Configuration"

 

RaviShrigiri_0-1642741335918.png

 


Create a new configuration  with some name "testcfg"


Do the configurations you need.

You can use reset to default-->inline so that you get default configuration to start with.

 

The file gets saved in ( for TS 2019) :
C:\ProgramData\National Instruments\TestStand 2019 (32-bit)\Cfg\ModelPlugins\ResultProcessing.cfg

 

Copy this file to the new machine ( overwrite existing).The new testcfg configuration should be already available and selected.

 

 

FYI here is a list of all TestStand configuration files:
https://zone.ni.com/reference/en-XX/help/370052AA-01/tsdeploysystem/infotopics/configurationfiles/

 

Hope this helps.

Ravi

NI Tech Support

0 Kudos
Message 2 of 6
(1,899 Views)

OK!  This is very cool, I can't believe I didn't notice those management options!

 

But now... is there a way to programmatically load/select a specific configuration?

0 Kudos
Message 3 of 6
(1,884 Views)

Hi Jed,

 

Please refer this link :

https://forums.ni.com/t5/NI-TestStand/Programmatically-change-Results-Active-Configuration/td-p/3112...

 

Check for response from Jiggawax.

Ravi

0 Kudos
Message 4 of 6
(1,877 Views)

For the sake of completeness, I should mention that the ResultProcessing.cfg and any other model plug-in configuration file is a PropertyObjectFile and can be manipulated via the TestStand API.

 

This is an advanced topic and the file structure is not documented. However, if you are comfortable with C/CVI, the source code that creates and manipulates these files can found at <TestStand>\Components\Models\TestStandModels\ModelSupport2\ResultProcessing.c.

 

<TestStand>\Components\Models\TestStandModels\ModelSupport2\ResultProcessing.h exports a some functions from there that can be useful.  These can be called from C/CVI  code or from sequence steps.

 

Here is an excerpt:

 

int DLLEXPORT _stdcall AddResultProcessingPluginToConfiguration(const char * pluginSequenceFilePath, const char * configurationName, BOOL alwaysAdd, BigErrMsg errMsg);
int DLLEXPORT _stdcall AddModelPluginToConfiguration(const char *configurationFileName, const char *pluginSequenceFilePath, const char *configurationName, const char *categoryName, BOOL alwaysAdd, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall RemoveResultProcessingPluginFromConfiguration(const char * pluginSequenceFilePath, const char * configurationName, BigErrMsg errMsg);
int DLLEXPORT _stdcall RemoveModelPluginFromConfiguration(const char * configurationFileName, const char * pluginSequenceFilePath, const char * configurationName, const char * categoryName, DefaultConfigurationOptions * defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall CreateDefaultModelPluginConfigurations(CAObjHandle engine, CAObjHandle thread /* for progress messages only, can be 0 */, BigErrMsg errMsg);
int DLLEXPORT _stdcall CreateDefaultModelPluginConfiguration(const char * configurationFileName, CAObjHandle engine, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall LoadModelPluginTypesAndConfigurations(CAObjHandle engine, CAObjHandle thread /* for progress messages only, can be 0 */, const char *categoryName, const char *configurationName, BOOL loadAddons, BOOL loadPluginTypesFirst, CAObjHandle *mergedConfiguration, BigErrMsg errMsg);

int DLLEXPORT _stdcall ReadModelPluginConfiguration(const char * configurationFileName, CAObjHandle engine, const char *configurationName, CAObjHandle *configuration, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);
int DLLEXPORT _stdcall ReadModelPluginConfigurationSet(const char *configurationFileName, CAObjHandle engine, CAObjHandle *configurationSet, DefaultConfigurationOptions *defaultConfigurationOptions, BigErrMsg errMsg);

 

 

Message 5 of 6
(1,870 Views)

Here you can find how to use ResultProcessing.c functions in a sequence file:

https://forums.ni.com/t5/NI-TestStand/How-to-programmatically-quot-install-quot-result-processing/m-...

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
0 Kudos
Message 6 of 6
(443 Views)