Skip to content

Runtime Configuration File

Kishor Basavaraju edited this page Oct 23, 2025 · 3 revisions

Configuring Custom Device channels at runtime without need to undeploy Runtime configuration file

Represents a runtime configuration file, which contains section property and channels that can be applied under RuntimeConfigurableSection without having to undeploy the system using APIs from IRuntimeConfiguarationManager.

Class: RuntimeConfiguration

Namespace: NationalInstruments.VeriStand.SystemDefinitionAPI

RuntimeConfiguration Constructor

Initializes a new instance of RuntimeConfiguration with the specified configuration

Parameters:

Parameter name Description
name The name of the RuntimeConfiguration.
description The description of the RuntimeConfiguration.
creator The user account name of the RuntimeConfiguration file creator.
version The file format version of the RuntimeConfiguration file.
filePath The path to the RuntimeConfiguration file on disk.

RuntimeConfiguration Constructor Overload

Initializes a new instance of RuntimeConfiguration with the specified file path.

Parameters:

Parameter name Description
nivsruntimeconfigFile Specifies the path to the RuntimeConfiguration file.

AddChildNodes

Adds sections and channels to the RuntimeConfiguration.

Parameters:

Parameter name Description
childNodes Specifies the child nodes to be added.
error Upon return, contains the error.

Returns: true if the child nodes are added successfully.

GetChildNodes

Gets an array containing the child nodes added to the RuntimeConfiguration.

Returns: An array of child nodes added to the RuntimeConfiguration.

SetAliases

Set Aliases for the channels in RuntimeConfiguration. The referencedChannels are relative RuntimeConfiguration. Note: The runtimeAliasFolderName must be unique across all runtime configurations. If it's not unique, then only the first applied configuration with that name will be added; subsequent ones will be ignored.

Parameters:

Parameter name Description
runtimeAliasFolderName The name of the alias folder under which aliases will be added.
referencedChannels The referenced channels.
aliasNames The alias names. When the configuration is applied, each alias name will be prefixed with runtimeAliasFolderName.
error Upon return, contains the error that caused the RuntimeConfiguration file to fail saving. If no error occurs, this parameter contains an empty string.

Returns: true if the aliases were successfully applied to the runtime alias folder.

GetAliases

Retrieves all aliases from a specified runtime alias folder in the RuntimeConfiguration.

Parameters:

Parameter name Description
runtimeAliasFolderName Upon return, Contains the name of the runtime alias folder from which aliases will be retrieved.
referencedChannels Upon return, contains the list of channels linked to the aliases in the runtime alias folder.
aliasNames Upon return, contains the list of alias names present under the runtime alias folder.
error Upon return, contains any error that occurred while retrieving the aliases. If no error occurs, this parameter will indicate no error.

Returns: true if the aliases were successfully retrieved from the runtime alias folder, otherwise

SaveConfigurationFile

Saves the RuntimeConfiguration to the specified file path.

Parameters:

Parameter name Description
error Upon return, contains the error that caused the RuntimeConfiguration file to fail saving. If no error occurs, this parameter contains an empty string.

Returns: true if the RuntimeConfiguration file was saved successfully.

SaveConfigurationFile Overload

Saves the RuntimeConfiguration to the specified file path.

Parameters:

Parameter name Description
filePath The path to save the RuntimeConfiguration file on disk.
error Upon return, contains the error that caused the RuntimeConfiguration file to fail saving. If no error occurs, this parameter contains an empty string.

Returns: true if the RuntimeConfiguration file was saved successfully.

Example

Custom Device developers are recommended to provide APIs to help generate the content for this file.

The Create Runtime Configuration Files.vi example demonstrates how to generate runtime configuration files using the scripting APIs provided by the Runtime Configuration Support Example.