NI_ModelPluginComponentDescription

Every model plug-in sequence file must include a FileGlobals.ModelPluginComponentDescription variable of type NI_ModelPluginComponentDescription. This variable includes the following fields. The data type appears in parentheses.

  • Default (NI_ModelPlugin)—The default structure and values for new instances of the plug-in. The process model copies this property to create a new instance of the plug-in in a configuration.
  • InsertOrder (Number)—A value that determines where the plug-in appears in the list of plug-ins you can insert. The list sorts in ascending order. For example, the built-in reporting plug-in uses a value of 1, and the built-in database plug-in uses a value of 2. Therefore, the built-in reporting plug-in appears before the built-in database plug-in in the list of plug-ins you can insert. You can specify fractional values.
  • ConfigurationOrder (Number)—A value that determines where the plug-in appears in the default configuration of plug-ins the process model creates if the plug-in configuration file does not yet exist. The plug-ins appear in ascending order. For example, the built-in reporting plug-in uses a value of 1, and the built-in database plug-in uses a value of 2. Therefore, the built-in reporting plug-in appears before the built-in database plug-in in the default configuration. You can specify fractional values.
  • InitializationExpression (Expression)—The process model evaluates this expression when it instantiates a new instance of the plug-in. Use this expression to initialize fields that cannot use a static default value, such as system-dependent paths. Use the ModelPlugin prefix in the expression to refer to ModelPlugin fields. You can also access a top-level UserCreated Boolean property to determine whether a user created the plug-in or TestStand created the plug-in when creating the initial configuration file. For example, the built-in offline results generator plug-in uses an expression similar to the following to specify the location of the default offline results directory in the <TestStand Public> \Components directory and to disable the offline results generator plug-in if you did not explicitly insert it: ModelPlugin.PluginSpecific.Options.Directory = Runstate.Engine.GetTestStandPath(TestStandPath_PublicComponents) + "\\Models\\UnprocessedResults", ModelPlugin.Base.Enabled = UserCreated
  • DisplayNameExpression (Expression)—The process model evaluates this expression to determine the display name of the plug-in to use in the list of plug-ins you can insert. Use the ResStr expression function to return a localizable string or specify a quoted string literal.