NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmaticaly inserting strings into array.

Solved!
Go to solution

Hello all,

 

So I have initialised a 1d array that is set to be the size of the amount of test sockets active using the following code.

SetNumElements(FileGlobals.ReportPaths,FileGlobals.NumberOfSockets)

 

I then use a FOR Loop to iterate thriugh the array using the LoopCount as the index to insert the string.

Uswing the following code.

#NoValidation(InsertElements(FileGlobals.ReportPaths,"[Locals.LoopCount]",Parameters.ReportFilePath))

 

I keep getting an error message stating that "[Locals.LoopCount]" is out of range.

 

Any ideas?

0 Kudos
Message 1 of 3
(2,066 Views)
Solution
Accepted by topic author Conor.

Solved. Don't use the TestStand API.

 

Do it like you would any other progrmaming language.

 

FileGlobals.ReportPaths[Locals.LoopCount] = Parameters.ReportFilePath

Message 2 of 3
(2,063 Views)

Hey Conor,

Thank you for reporting your solution, this is really helpful!


Ingo – LabVIEW 2013, 2014, 2015, 2016, 2017, 2018, NXG 2.0, 2.1, 3.0
CLADMSD
0 Kudos
Message 3 of 3
(1,944 Views)