NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Insert element into array (manually)

Hello,
 
I have an issue with the insertion of elements into an array. Here's the situation;
- I've declared an array of strings as a local variable (let's say a 10-element array)
- All the fields of the array have been filled with strings.
- I would like to insert a new element into the array (for example at index 3)
 
When I go to the "bounds" property and increase the array's bounds, the new element is added at the end of the array. Is there a means to insert the new element in any other position ?
 
Thanks
 
Zouz
0 Kudos
Message 1 of 2
(3,421 Views)

If you call a PropertyObject.SetVal<DataType>ByOffset() method, you can pass PropOption_InsertElement to the options parameter.

0 Kudos
Message 2 of 2
(3,415 Views)