VeriStand .NET API Reference

Part 4: Removing Broken Aliases and Channel Mappings

In this section, the example code removes any aliases and channel mappings that broke while modifying the inputs and outputs of the DAQ device. Aliases and channel mappings can break when you remove channels that aliases or channel mappings link to.

4a. Removing Unmapped Aliases


Find the aliases under the Aliases section of the system definition file. To do so, obtain references to the following items, in descending order:
  1. The Aliases section (obtained from the Root dottable property and GetAliases method)
  2. The aliases in the Aliases section (obtained from the GetAliasesList method)


Find any aliases without a channel by:
  1. Getting the LinkedChannel property of each alias.
  2. Getting the Name property of each linked channel.
  3. Evaluating whether or not a name exists for the channel using the Empty String/Path? Function. If the Name property does not exist for the linked channel, the alias is not linked to a channel.


Remove any aliases without a channel using the RemoveNode method.

4b. Removing Blank Channel Mappings


Obtain references to all of the channel mappings in the system definition.


Create an array of any broken channel mappings by:
  1. Checking the channelPathSources array for empty strings with the Empty String/Path? function. If no source channel exists, the mapping is broken.
  2. Adding any broken channel mappings to the array.


Delete channel mappings added to the array in the previous step.


Save the system definition file.

Related Links

Programming with the System Definition API in LabVIEW

Navigating the System Definition API

Previous Step
Part 3: Adding Digital Input and Output Channels to a DAQ Device
Home
LabVIEW Walkthrough: Modifying a DAQ Device in a System Definition File