Sequence File Translators

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Purpose

This example demonstrates how to create and use a sequence file translators, which is a DLL that TestStand uses to load sequence files in custom formats. A translator implements a set of required callbacks that TestStand invokes to determine the types of files the translator can open and to load a custom file as a TestStand sequence file. You can use translators to open files in custom formats. Once TestStand loads a custom file as a TestStand sequence file, you can operate on the file like any other TestStand sequence file. However, you cannot save changes in the TestStand sequence file back to the original format.

The example directory contains projects for example translators written in LabVIEW, LabWindows/CVI, and Microsoft Visual C++. The examples illustrate translating text and XML files and contain a template project you can use to develop a translator in each development environment. Each example can translate the corresponding text or XML file located in the same directory as the example.

Example File Location


Open Example

<TestStand Public>\Examples\Fundamentals\Sequence File Translators - Examples\SetupExampleTranslators.seq

Highlighted Features

Sequence file translators

Major API

N/A

Prerequisites

Before you attempt to open a file in a custom format, you must install the example translator DLL and support files to the appropriate directories in one of the following ways:

  • Automatic Installation (recommended)—Open the SetupExampleTranslators.seq example sequence file and run the MainSequence to select the examples to set up.
  • Manual Installation—Complete the following steps to manually move the translator DLL and support files:
    1. Open the TextTranslator or XMLTranslator directory for one of the examples in the <TestStand Public>\Examples\Fundamentals\Sequence File Translators - Examples directory, and copy the translator DLL from the selected directory to the <TestStand Public>\Components\Translators directory.
    2. Copy the NI_ExampleTranslatorTypes.ini type file from the <TestStand Public>\Examples\Fundamentals\Sequence File Translators - Examples directory to the <TestStand Public>\Components\TypePalettes directory.
    3. Copy the FrontPanel.uir and StepType.dll files from the <TestStand Public>\Examples\Fundamentals\Sequence File Translators - Examples\Common directory to the <TestStand Public>\Components\StepTypes\Translators directory.

You must restart the TestStand Sequence Editor so that TestStand can load the example translator DLL.

How to Use This Example

To open a file with a custom format, select File»Open to launch the Open File dialog box. The Files of Type control in the Open File dialog box contains the new file extensions the translator supports. Browse to the examples directory that corresponds to the development environment you are using and the custom format for which you installed a translator and select SampleFile.

Note Note  If you modify and rebuild an example translator DLL, you must copy the DLL to the <TestStand Public>\Components\Translators directory and restart TestStand to load the new DLL.

See Also

Open File dialog box

Sequence File Translators

WAS THIS ARTICLE HELPFUL?

Not Helpful