NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Reorder ResultList array “Swap in place array‘

Solved!
Go to solution
I need to change the order of the ResultList at the end of the sequences

I need to  reorder of the ResultSet Array at the end of the sequences. Any way is fine (API TestStand, F (x) Statement). Any Idea? 

0 Kudos
Message 1 of 3
(1,007 Views)
Solution
Accepted by topic author gantarone

I use this expression to reorder the model plugin configuration (move index 0 to the end of the Plugins array). You can replace the Plugins array with yours and play with the expression a bit.

Parameters.ModelPluginConfiguration.Plugins.SetPropertyObjectByOffset(GetNumElements(Parameters.ModelPluginConfiguration.Plugins), PropOption_InsertElement | PropOption_NotOwning, Parameters.ModelPluginConfiguration.Plugins[Parameters.ModelPlugin.Base.RuntimeVariables.ProcessorIndex]),
Parameters.ModelPluginConfiguration.Plugins.DeleteElements(Parameters.ModelPlugin.Base.RuntimeVariables.ProcessorIndex, 1)

So something like this:

<AnArray>.SetPropertyObjectByOffset(
   <NewIndex>,
   PropOption_InsertElement | PropOption_NotOwning,
   <AnArray>[<CurrentIndex>] 'New Value
),
<AnArray>.DeleteElements(
   <CurrentIndex>,
   1
)

 

Michał Bieńkowski
CLA, CTA, CPI

  1. Did someone devote their time to help solve your problem? Appreciate it and give kudos.
  2. Problem solved? Accept as a solution so that others can find it faster in the future.
  3. Contribute to the development of TestStand by voting on the TestStand Idea Exchange.
Message 2 of 3
(967 Views)

I apologize for the delay, I had found another solution, but this is simpler and therefore functional !!!
Thanks Bravo!!!

0 Kudos
Message 3 of 3
(940 Views)