08-24-2005 09:43 AM
08-24-2005 02:40 PM
08-25-2005 03:21 AM
Thank You Ray,
but how can I do this with a Array with two dimensions?
regards Samuel
08-25-2005 04:22 AM - edited 08-25-2005 04:22 AM
Message Edited by Ray Farmer on 08-25-2005 10:28 AM
08-25-2005 04:29 AM
Ray,
but with a array with two dimensions I have the indizes Problems. what should I type where the red "?" are in my attached *.xls file
regars samuel
08-25-2005 05:18 AM
Samuel,
as below
<Locals> |
|||
load_spec[ 0][0] |
1 |
||
load_spec[0 ][1] |
2 |
||
load_spec[0 ][2] |
3 |
||
load_spec[0 ][3] |
4 |
load_spec[1 ][0] |
2 |
||
load_spec[1 ][1] |
2 |
||
load_spec[1 ][2] |
2 |
||
load_spec[1 ][3] |
2 |
Regards
Ray.
08-25-2005 05:23 AM
yes Ray I understand you, but my real *.xls list ist much more bigger and I can´t spend a description for each member of the array.
I wan´t to use the structure from my *.xls file
is that not possible?
08-25-2005 02:45 PM
Hi,
srapp,
what version of TestStand are you using?
In TestStand 3.1 you can import/export arrays and containers as xml strings using the property loader.
In previous versions of teststand you have to specify each element of the array you want to export/import.
The easiest way to create your source file (excel file containing the data) is to use the Import/Export properties tool.
Go to Tools->Import/Export Properties and select the properties (array) you want to export.
Specify the file location and as a format select Excel File.
Go to the properties tab a select the properties you want to import/export.
Click on the export button and the tool will create for you the excel file.
You can then edit the file and set it to contain the values you want.
Hope it helps.
This post could help
http://forums.ni.com/ni/board/message?board.id=330&message.id=7578#M7578
Antonio Lie.
08-29-2005 11:14 AM
08-29-2005 04:25 PM - edited 08-29-2005 04:25 PM
Samuel,
I am attaching an example.
It consists of a sequence file and an excel file.
There are two local variables in the sequence file, Array1 and Array2. Both arrays have 2 dimensions ([0..2][0..2]).
I am using a Property Loader Step Type to load the values in the "MySourceFile.xls" file into the arrays.
If you check the property loader configuration, you will se that for Locals.Array1 I selected the array itself and that for Locals.Array2 I specified every single element of the array.
Now open the excel file and you will notice the difference. By specifyng the array by itself the result is an XML string and the value of the elements are inside <Value ID='[?][?]'>1</Value>. If you want to modify the values you only have to change the corresponding element.
For Array2 you get the name of every element in the array (I configured it to be this way). To change the value, you only modify the value corresponding to the corresponding element.
Hope It helps.
Message Edited by Antonio Lie (NI) on 08-29-2005 04:27 PM