ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get dynamically created container (with TestStand API and C#) from a subsequence?

Hi,
 
In my sequence, I alway do the same stuff in the setup:
1. I read contants from Excel files with a C#-action I wrote
2. I put all the contants in 1 container. The variables are created at runtime.
 
Now I whant to put my setup in an extra sequence, so that when I do some change in it, the changes take effect automatically in each sequence calling my setup-sequence. The problem is the container containing my constants is created at runtime and the contains depend on the Excel files, which are free customizable. I already try to pass an empty container by reference as parameter of the setup-sequence and create my variables in this parameters, but it doesn't works.
 
Anybody an idea?
 
Cheers,
Risotto
0 Kudos
Message 1 of 3
(3,904 Views)

Hi,

You could try using a Locals variable and sent the property to Propagate to Subsequence (PropFlag_Propagate).

At runtime you would see the same variable in your sub-sequence's Locals area.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,877 Views)
Hi Ray,
 
Thanks you for your answer.
I already try this method, but I was not really happy to use local variable and propagate them in the subsequence.
 
I found another solution, which consist to use the property "Caller". It is like passing an object per reference in C#.
 
Risotto
0 Kudos
Message 3 of 3
(3,875 Views)