NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically creating local variable


Hi,

I need to create a local variable of custom data type using a Statement. Which teststand API should I use? 

0 Kudos
Message 1 of 2
(2,148 Views)

Hi Savitha242, 

 

 If you want to write code in statement  to generate customized data, you could follow below pictures ~

 

ricky10116_real_0-1585708340527.png

 

====

Locals.NewSubProperty("Container ", PropValType_Container , False," ", PropOption_DoNothingIfExists),
#NoValidation(Locals.Container.SetValNumber("Number", PropOption_InsertIfMissing, 10)),
#NoValidation(Locals.Container.SetValString("String", PropOption_InsertIfMissing, "Hello World!!")),

====

 

Here is the result : 

ricky10116_real_1-1585708373291.png

 

And if you already have the position where you want to generate data, you don't need to use #NoValidation ~

 

 

Thanks,

Ricky

 

 

0 Kudos
Message 2 of 2
(2,091 Views)