Using the Import/Export Properties Tool to Export Limits to a Database
Overview
Some applications require one test sequence to be used for testing different models of a particular product line. Each model uses the same tests, but requires a different set of values for the tests. The Import/Export Properties Tool can be used to export and import variable and property values to and from a database. The ability to save sets of values for later reference enhances the versatility of test sequences.
Table of Contents
Introduction
This tutorial walks through the process of exporting limits from a sequence to an Access database. A sequence file with three Multiple Numeric Limit steps and a nearly empty Access database are available from the linked example program as a starting point.
Opening the Sequence Editor, a Sequence File and the Import/Export Properties Tool
1. Have the sequence file, with MultNumTests.seq, opened in the Sequence Editor.
2. Open the Import/Export Properties dialog by selecting Tools>>Import/Export Properties.
3. On the Source/Destination tab, select Database for Data Location. The Import/Export Properties dialog will appear as:

[+] Enlarge Image
Creating a Data Link to the Database
1. On the Source/Destination tab, press Select Data Link button. This will open Select Data Link dialog.
2. In the Select Data Link dialog, press New. This will open Edit Data Link dialog.
3. In the Edit Data Link dialog:
a. Type in a Data Link Name. This name can be of your choosing.
b. Press the Build button. This will open the Data Link Properties dialog.
4. On the Provider tab of the Data Link Properties dialog, select the Microsoft 4.0 OLE DB Provider and press Next.
5. Press the … button to browse for the Access database you will be using. This will open the Select Access Database dialog.
6. In the Select Access Database dialog, select Access.mdb provided in this tutorial and press Open.
7. In the Data Link Properties dialog, press Test Connection to test the connection to the database. Press OK.
8. Press OK in the Data Link Properties dialog. The Edit Data Link dialog will appear as:

9. Press OK in the Edit Data Link dialog.
10. Select your data link in the Select Data Link dialog and press OK.
Selecting Properties to Export;
1. On the Source/Destination tab of the Import/Export Properties dialog, put "SELECT * FROM STEP_PROPERTIES" for the SQL Statement.
2. On the Properties tab of the Import/Export Properties dialog:
a. If there are any properties in the Selected list control, press the double left arrow button (<<) to remove them.
b. Press the Limits> button to add all limit properties to the Selected list control.

[+] Enlarge Image
Creating the Appropriate Columns in the Database for the Selected Properties
1. Press the Create Columns button. This will open the Create Columns dialog.

[+] Enlarge Image
2. In the Create Columns dialog:
a. Press the Create Columns button.
b. Press OK in the resulting message window. This message will communicate the success of the column creation.
c. Press Done.
Exporting the Selected Properties to the Database
1. On the Properties tab of the Import/Export Properties dialog, press the Export button.
2. Press OK in the Export dialog. This dialog communicates the success of exporting the selected properties to the database.
3. Press Done to close the Import/Export Properties dialog.
Conclusion
The Limits from the three Multiple Numeric Limit steps are now saved in the Access database. The data can be viewed using the Database Viewer (Tools>>Database Viewer). Here is a view of the exported data in the Database Viewer:

[+] Enlarge Image
This data can be imported into a sequence using the Import/Export Properties Tool or the Property Loader and Database step types. Refer to Appendix D, Database Step Types, in the TestStand Reference Manual for more information about the Property Loader step type. An example of using the Property Loader with a database can be found in the <TestStand>\Examples\Database folder.
Reader Comments | Submit a comment »
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
