NI TestStand Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
MimiKLM

Introduce data binding/handling mechanism for arrays

Status: Declined

I'm declining this idea due to lack of community support.

Hi,

 

Sometimes I can find difficult to access arrays using indexes. Although straightforward it can be difficult to maintain in certain situations, like calibration data for a lot of frequencies. Lets imagine you have a table of sixty calibration factors per frequency and forty frequencies, generated by third party software to the excel file.

 

It would improve accessibility if we could name columns and rows and use their names instead/along with the indexes.

 

We can access the array data like AnArray[4][6] now. In this idea we could access the data like that: AnArray["63dB”]["125MHz"].

 

When we would like to import the data using property loader it would be easier to access the data with defined names of colums and rows rather than indexes. (data binding)

7 Comments
RavensFan
Knight of NI

If you use rings or enums to associate a name with a number, then you can use the ring or enum to index the 2-D array.

MimiKLM
Active Participant

Do you mean rings & enums in TestStand???

crossrulz
Knight of NI

I wish: Support for Creation of Enumerated Type Variables


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
MimiKLM
Active Participant

Familiar with that topic. That's why '???' 🙂

dug9000
NI Employee (retired)

You can create an array of arrays to be able to index them by name like you are asking.

 

1) Create an array of containers.

2) Change the types of the elements in the container to be arrays of containers as well.

3) Then change the elements of those arrays to be the datatype you desire for the end result of the indexing.

4) Change the names of the elements to correspond to the names you want to index them with.

5) You can now do things like Locals.myArray["name1"]["name2"] in an expression at least.

 

Creating the arrays of arrays can be done manually, but it might be easier to do programmatically if you have a lot of elements.

 

Hope this helps,

-Doug

MimiKLM
Active Participant

dug9000,

 

Nice workaround.

 

However it would be good to have the functionality of renaming columns and rows to be build in TS natively.

WireWeaver
Active Participant
Status changed to: Declined

I'm declining this idea due to lack of community support.

https://www.linkedin.com/in/trentweaver