NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

array in TestStand

Hi  gurus,
       I have a doubt that how can we create Array of string in TestStand 4.0 using C#.NET environment.
I used following method, but failed to create array:
 

objPropertyObj.SetValStringByOffset(10,PropertyOptions.PropOption_InsertIfMissing,"SRU"); // exception here....

The other following method creates array with empty size:

objPropertyObj.NewSubProperty(

"SUBSTITUTE.SRU", PropertyValueTypes.PropValType_String, true, "Arrayw",10 );

Please let me know how to set the size of the array at second method.

Thank you,

regards

RKK

0 Kudos
Message 1 of 4
(3,637 Views)
Hi,
 
I beleive the InsertIfMissing only supported by the SetVal method.
You can use the SetValVariant Method to set a complete array. look at the example snipet in the Help Programmer Reference and / or the example in the teststand folder.
 
Regards
Ray
Regards
Ray Farmer
0 Kudos
Message 2 of 4
(3,633 Views)
Also see PropertyObject.SetNumElements and PropertyObject.SetDimensions
0 Kudos
Message 3 of 4
(3,622 Views)

Hi rkk,

I have added a small function from a former thread to you

Just take a look at it

 

Greetings

Juergen

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 4 of 4
(3,604 Views)