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: 

Resize 1D array not working like expected

Solved!
Go to solution

I try to resize a 1dimensional array in Teststand via AvtiveX using SetNumElements() with oprion 0x00.

 

The array is resized but its new size = OldSize + NewSize. EG: array has 3 elements and I resize to 5, it will have 8 elements in the end.

 

How to resize and array?

How to empty an array?

 

 

0 Kudos
Message 1 of 4
(3,776 Views)

Which version of TestStand are you using?  When I try what you are saying in a statement step my array resizes correctly:

SetNumElements(Locals.MyArray, 😎

 

Are you doing this in an ActiveX step or a code module?

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 4
(3,767 Views)

I am using TS 2012 5.0.0.0.252 and I am using Active X.

 

SetNumElements.jpg

 

0 Kudos
Message 3 of 4
(3,753 Views)
Solution
Accepted by topic author CristianL.

I have made it work somehow...

 

I am not sure how I got the resize to behave that way, but probably I had an Ignored!! error in other substeps I was using before SetNumElements.

 

It works now like expected.

0 Kudos
Message 4 of 4
(3,748 Views)