NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Default Parameters - Modifying Multiple Emtpy Expressions at Once

Solved!
Go to solution

I have a rather large architecture already written.  I have recently had to add a parameter to a function (subsequence) that is widely used throughout my TestStand architecture.  I simply added a boolean check that I can use inside the subsequence.  Now that I have added the parameter, I have reloaded all of the subsequences and the boolean field for the parameter has an error stating "The expression cannot be empty."  I would like to either be able to set a default value of false or just find all of the instances of "The expression cannot be empty" and set them to false. So far, I have been unable to get this to work, I cannot do a find/replace on the error because it doesn't pick it up.  Is there a way to cleanly set the default or modify multiple errors at once?  It will take me forever to manually type in "false" for all of the calls of this subsequence. There are only a few cases where I will need this to be True.

0 Kudos
Message 1 of 11
(5,194 Views)

Debug>>Sequence Analyzer

 

It will show all the errors.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 11
(5,177 Views)

I have run the sequence analyzer, and I can manually click on every error that it finds put true or false in.  There are currently hundreds of instances, and this would be time consuming. I am looking for a way to select multiple instances and change them at the same time.  I want to avoid individually modifying each instance.  Unless you are implying that I can somehow select multiple results from the analysis and change them all at once?

0 Kudos
Message 3 of 11
(5,173 Views)

You can hold down control and select all the steps that are calling that subsequence.  Then you should be able to change them all at once.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 4 of 11
(5,160 Views)

Have you successfully accomplished changing all of them at once?  I have run the analysis, and I can select all of the steps that I want to change, but I cannot figure out how to modify the parameter values for all of those steps from this screen.  When I select them and double click, it just takes me to one specific step.  When I right-click there is no option to modify all of them.  Is there a rule I need to set or some setup that needs to happen before this works?  Explicit instructions would be helpful.

 

Thanks!

0 Kudos
Message 5 of 11
(5,156 Views)

Ok sorry.  I will try and be more clear.  The analyzer will just point you to any issues with the sequence files.

If you want to modify multiple steps at once:

1.  Select all Sequence Call steps that are calling the sequence with the new parameter (hold down Ctrl to select multiple while you are selecting)

2.  In the Module tab type in the new value for the new parameter (or check the Default box if you want to use the default value)

3.  Click anywhere in your Steps pane to accept the changes

Consider the attached images.  Before and After.

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Download All
0 Kudos
Message 6 of 11
(5,147 Views)

This isn't optimal, but it might be the easiest way to do it:

 

Do a find in files searching for Expr with the "whole word only" option checked. Then sort by the value column to find all of them that are empty. Hopefully most of the empty ones will be the ones you want to change. Select all of the ones you want to change, type false into the "Replace With:" edit control, and press the "Replace Value" button.

 

Hope this helps,

-Doug

0 Kudos
Message 7 of 11
(5,146 Views)

The method called out by Jigg is what I was trying to avoid.  I have 100+ subsequences and will have to manually select all of the steps I want to change in each one and change them. I tried Doug's method but there are too many items that are blank for me to successfully sort through.  Looks like the simple answer is that there is no way to automate this...seems like a shortcoming of TestStand.  A default setting on parameter values, or a way to change multiple instances of the same error found in the analysis tool would make large architectures way easier.  Thanks for your responses, time to admit defeat and start working my way through.

0 Kudos
Message 8 of 11
(5,140 Views)

@Brindlaj0113 wrote:

The method called out by Jigg is what I was trying to avoid.  I have 100+ subsequences and will have to manually select all of the steps I want to change in each one and change them. I tried Doug's method but there are too many items that are blank for me to successfully sort through.  Looks like the simple answer is that there is no way to automate this...seems like a shortcoming of TestStand.  A default setting on parameter values, or a way to change multiple instances of the same error found in the analysis tool would make large architectures way easier.  Thanks for your responses, time to admit defeat and start working my way through.


You could write a tool that iterates through all of the steps in all of the files and update them. Depending on how familiar you are with the TestStand APIs and how many steps you have to update, it might or might not be worth the trouble.

 

-Doug

0 Kudos
Message 9 of 11
(5,134 Views)
Solution
Accepted by topic author Brindlaj0113

You could search as Doug suggested and filter your results using something like the following. You'll get some extra results, but it might save you some time.

 

SearchFilter.png

0 Kudos
Message 10 of 11
(5,107 Views)