NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Where to insert more AddExtraResult methods

Solved!
Go to solution

Hello everyone,

 

I'm exploring the wonderful world of my custom process model and the accompanying ModelSupport.seq file. I've been pouring over the advanced TestStand documentation from NI but I can't seem to find the answer I'm looking for. So I notice that within Initialize Execution Entry Point within ModelSupport.seq that there are two method calls which AddExtraResult "Limits" and "Comp" to the results list. That's great! (I assume that for steps without those properties that it just skips over that process and doesn't throw an error or anything.) I would like to expand on this functionality to add more properties to the results list. When I tried duplicating the step Include Limits in Results and then attempting to save ModelSupport.seq I get a big fat error saying it failed to save the sequence. So am I not supposed to modify ModelSupport.seq which lives in the Program Files (x86) directory? I can't find any documentation on this...

 

If I want to add more AddExtraResults steps should I be doing it from elsewhere in my custom Process Model? That's kinda what I take from the Configuring Results Collection section of https://www.ni.com/en/support/documentation/supplemental/08/teststand-report-generation-and-customiz.... It would just be nice if all of these steps were in the same location within Initialize Execution Entry Point and not scattered about. 

 

Thanks,

0 Kudos
Message 1 of 7
(1,487 Views)

Based on the fact that I didn't get any responses yet, I think I asked a very specific question that others may not have encountered before with the AddExtraResult method. So maybe I can ask a more generic question. 

 

If I find functionality within the ModelSupport.seq that I would like to extend, should I edit the ModelSupport.seq file or perhaps instead add a new sequence call to my custom process model that extends that functionality. The reason I hesitated to modify ModelSupport.seq is because TestStand throws an error when trying to save the file that resides in Program Files (x86) directory and may just be read only. 

 

Thoughts? Should I be able to edit ModelSupport.seq?

0 Kudos
Message 2 of 7
(1,468 Views)
Solution
Accepted by topic author bartelma

You should use the TestStand environments : Select the menu Configure / Environment, then activate the Public Custom directory and save your enivronment on the disk

 

Then you can go in the newly created folder "...\Public\Components\Models" and copy the ModelSupport.seq from your TestStand directory into the folder "...\Public\Components\Models\TestStandModels"

 

NowTestStand will use your new ModelSupport.seq file, which can be modified

 

Regards

Laurent

 

Message 3 of 7
(1,455 Views)

Thanks so much Laurent_B! That's exactly what I needed to know. I was already using a custom process model that lived in the teststand public directory so all I had to do was create the \TestStandModels directory and copy the ModelSupport.seq file there and away we go. Now I can extend the method I wanted to without any issues. 

0 Kudos
Message 4 of 7
(1,448 Views)

1. You can't modify files on Program Files by default without admin privileges to protect the integrity of your installed programs. You can override models (and other files) by placing modified copies in alternate locations. See the note at the bottom of https://www.ni.com/docs/en-US/bundle/teststand/page/teststand-process-models.html

 

 

2. An alternative to modifying a process model (assuming you are using a TS 2012 or later process model file, or a file customized from such a file) is to create a process model plug-in. Plug-in are sequence files that models load and call depending on configuration settings. If you save a plug-in file in a specific location, it is called an add-on, and will be called always, regardless of configuration. This makes it an easy way to added functionality, such as configuring additional results.

https://www.ni.com/docs/en-US/bundle/teststand/page/creating-process-model-plug-ins.html

https://www.ni.com/docs/en-US/bundle/teststand/page/configuring-process-model-plug-ins.html

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

That's great information to have James. Thanks a ton!

 

I'm still very much a TestStand novice but I've been using it for about a year now. The power of TestStand continues to amaze me. The plug-in and addon architecture is brilliant. I've never created an addon but I've created a few new report plug-ins. From the sound of it, based on the article and help links you shared, the addons are called no matter what from the process model and are not enabled/disabled like the report plug-ins can be. That could be very powerful. 

 

I already went down the route of creating a TestStand Public version of ModelSupport.seq and added in the additional results steps there, but maybe in the future I'll come up with a reason to create an addon. Do you have examples beyond what NI listed in their help text for when you've used an addon vs editing the process model or model support sequences?

0 Kudos
Message 6 of 7
(1,408 Views)

I don't have an example list, but any time you can accomplish your goal with a plug-in or add-on instead of a custom model, then that is preferable because a customized model will not get any future enhancements or bug fixes from NI unless you manually merge them in.

0 Kudos
Message 7 of 7
(1,391 Views)