From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Return a column from the elements in an array of containers

Some background...I have a custom type called XYZ, which is a container which contains three numbers (X, Y, Z). From this I have an array of type XYZ. I want to return all "Y" values for use as a Data Source in a NumericLimit test.

I know with a regular 2D array I can do this to return a column of data...

Locals.SingleColumn = Locals.Array2D[0..][1]

With an array of containers I was expecting to be able to do something like this, but it throws an error (I think something like "unknown property Y")...

Locals.SingleColumn = Locals.ArrayXYZ[0..].Y

 I've tried using the API and I can get pretty close, but it returns an array of object references instead of an array of numbers which is what I'm really looking for...

Locals.SingleColumn = Locals.ArrayXYZ.GetSubProperties("Y", 0)

So how do I generate an array of numbers from one of the element fields within this array of containers??

0 Kudos
Message 1 of 1
(556 Views)