Using the Database Options with TestStand 2013 or Earlier Process Models

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

If you are using the TestStand 2013 or earlier process models, complete the following steps to launch the Database Options dialog box, to read a database schema, or to read database options.

Launching the Database Options Dialog Box

Complete the following steps to launch the Database Options dialog box.

  1. Delete the Database Option – Construct and Database Option - Display Dialog ActiveX Adapter steps in the process models. If these steps do not exist in the process models, delete the ActiveX Adapter steps that call the CTsDBOptions2.Construct and the CTsDBOptions2.DisplayDatabaseOptionsDialog methods.
  2. Add a .NET Adapter step and specify the relative assembly path as Components\Models\TestStandModels\Database\DBOptions\TSDBOptions.dll.
  3. Select the DisplayDatabaseOptionsDialog method in the .NET Invocation option for the step.

DisplayDatabaseOptionsDialog Method

Syntax

DisplayDatabaseOptionsDialog (engine, fileName, sequenceContext, fileDirectory, optionsLoggingPersistentStore, fromLegacyModel)

Purpose

Launches the Database Options dialog box.

Remarks

In TestStand 2012 or later process models, the Database Option - Display Dialog step of the Model Plugin – Configure Standard Options entry point in the <TestStand>/Components/Models/ModelPlugins/NI_DatabaseLogger.seq file calls this method. In the equivalent legacy TestStand 2010 process models, the Database Option - Display Dialog step in the Display Database Options Dialog sequence of the <TestStand>/Components/Models/TestStandModels/Database/Database.seq file calls this method.

Parameters

engine As Engine

[In] Specifies the Engine object.

fileName As String

[In] Specifies the configuration filename. Pass an empty string to use the default configuration filename TestStandDatabaseSchemas.ini.

sequenceContext As SequenceContext

[In] Specifies a reference to a SequenceContext object. This parameter corresponds to the SeqContext parameter in the CTsDBOptions2.DisplayDatabaseOptionsDialog method the ActiveX Adapter step called.

fileDirectory As String

[In] Specifies the directory of the configuration file. Pass an empty string to use the default TestStand configuration directory.

optionsLoggingPersistentStore As PropertyObject

[In] If you are using TestStand 2012 or later process models, pass the PluginSpecific.Options that corresponds to the database logging process model plug-in instance. If you are using the equivalent legacy TestStand 2010 process models, pass Nothing to read the database options from the TestStandDatabaseSchemas.ini file. This parameter corresponds to the optionsLoggingPersistentStore parameter in the CTsDBOptions2.DisplayDatabaseOptionsDialog method the ActiveX Adapter step called.

fromLegacyModel As Boolean

[In] Pass False if you are using the TestStand 2012 or later process models. Pass True otherwise.

Reading a Database Schema

Complete the following steps to read a database schema.

  1. Delete the Database Option – Construct and Read Database Option - Read Schema ActiveX Adapter steps in the process models. If these steps do not exist in the process models, delete the ActiveX Adapter steps that call the CTsDBOptions.Construct and the CTsDBOptions.ReadDatabaseSchema methods.
  2. Add a .NET Adapter step and specify the relative assembly path as Components\Models\TestStandModels\Database\DBOptions\TSDBOptions.dll.
  3. Select the ReadDatabaseSchema method in the .NET Invocation option for the step.

ReadDatabaseSchema Method

Syntax

ReadDatabaseSchema (engine, schemaName, databaseSchema, fileDirectory)

Purpose

Reads the specified database schema from the configuration file TestStandDatabaseSchemas.ini.

Remarks

In TestStand 2012 or later process models, the Read Database Option - Read Schema step of the Model Plugin – Begin entry point in the <TestStand>/Components/Models/ModelPlugins/NI_DatabaseLogger.seq file calls this method. In the equivalent legacy TestStand 2010 process models, the Read Database Option - Read Schema step in the Get Database Options sequence of the <TestStand>/Components/Models/TestStandModels/Database/SequentialModel.seq file calls this method. The BatchModel.seq and ParallelModel.seq files also include this step.

Parameters

engine As Engine

[In] Specifies the Engine object.

schemaName As String

[In] Specifies the name of the schema to read.

databaseSchema As PropertyObject

[Out] Returns the instance of the NI_DatabaseOptionsSchema type. This parameter corresponds to the DatabaseSchema parameter in the CTsDBOptions.ReadDatabaseSchema method the ActiveX Adapter step called.

fileDirectory As String

[In] Specifies the directory of the configuration file. Pass an empty string to use the default TestStand configuration directory.

Reading Database Options

Complete the following steps to read database options.

  1. Delete the Database Option – Construct and Read Database Option - Read Options ActiveX Adapter steps in the process models. If these steps do not exist in the process models, delete the ActiveX Adapter steps that call the CTsDBOptions.Construct and the CTsDBOptions.ReadDatabaseOptions methods.
  2. Add a .NET Adapter step and specify the relative assembly path as Components\Models\TestStandModels\Database\DBOptions\TSDBOptions.dll.
  3. Select the ReadDatabaseOptions method in the .NET Invocation option for the step.

ReadDatabaseOptions Method

Syntax

ReadDatabaseOptions (engine, databaseOptions, fileDirectory)

Purpose

Reads the database options from the configuration file TestStandDatabaseSchemas.ini.

Remarks

In the equivalent legacy TestStand 2010 process models, the Read Database Option - Read Options step in the Get Database Options sequence of the <TestStand>/Components/Models/TestStandModels/Database/SequentialModel.seq file calls this method. The BatchModel.seq and ParallelModel.seq files also include this step.

Parameters

engine As Engine

[In] Specifies the Engine object.

databaseOptions As PropertyObject

[Out] Returns the instance of the DatabaseOptions type. This parameter corresponds to the DatabaseOptions parameter in the CTsDBOptions.ReadDatabaseOptions method the ActiveX Adapter step called.

fileDirectory As String

[In] Specifies the directory of the configuration file. Pass an empty string to use the default TestStand configuration directory.


See Also

Process Model Plug-In Architecture

WAS THIS ARTICLE HELPFUL?

Not Helpful