02-13-2023 07:22 AM
I'm learning NI TestStand, and I'm having issues with arrays. I have an array of size 10 which is of type 'Container.' I'm trying to have a function which checks the size of this local array and set that equal to a Local integer variable. I found the link below, but it doesn't work for me at all and I keep getting an error message saying "Method GetDimensionSizes() does not exist in interface "Array Dimensions"
02-13-2023 07:56 AM
Hello teach02 and welcome,
to respond to your question:
GetNumElements() is the method you are looking for. It returns the size of a 1D array, in your case 10.
GetDimensionSizes() is designed to give you all sizes of a multidimensional array, therefore it returns an array of array sizes.
Though it needs to be called in an unintuitive way, which would be: Locals.MyArray.Type.ArrayDimensions.GetDimensionsSizes().
to respond to your title: Yes, a little.
Next time please try to give a title which is more descriptive of your actual problem. Since you are posting to the NI TestStand sub-forum, most people looking at your post are familiar with NI TestStand. But that does not mean they are familiar with the TestStand API.
Stefan