NI Switch Executive

Content Type
Programming Language
Current manual

Using the Configuration API

Using the Configuration API

The configuration API provides a programmatic interface to configure your NI Switch Executive virtual devices. Use the configuration API for the following tasks:

  • Virtual device creation/editing—Create new virtual devices programmatically and edit existing configurations. The configuration API provides programmatic access to IVI devices, channels, exclusions, hardwires, buses, routes, and route groups.
  • Configuration management—Programmatically import, export, delete, and rename NI Switch Executive configurations.
  • Report generation—Create both simple and advanced reports by reading the configuration associated with a specified virtual device.

Object Hierarchy

API Object Hierarchy

Additional Considerations

Differences exist between creating and editing your configuration in MAX and doing so programmatically:

  • In MAX, you can change the hardwire on a channel from the channel details. Programmatically, you can only read the hardwire on the channel. To change the hardwire on a channel programmatically, you must first disassociate that channel from its current hardwire (if it was on a hardwire), and then associate it with another hardwire.
  • The MAX UI configuration performs extensive checks when creating routes. When programmatically creating routes and route groups, NI Switch Executive performs only a portion of these checks:
    • You can programmatically set the constraints for a route, but these constraints are not checked when you set the route specification.
    • You can programmatically create a route that uses channels with different wire modes.
    • You can programmatically set the route specification to any well-formed string of channels. Although NI Switch Executive checks the route specification string for both valid channel names and syntax, it does not verify that the intermediate channels are reserved for routing, nor does it check for violations of exclusion conflicts.
    • You can programmatically add routes to the route group. However, NI Switch Executive does not check whether the routes can coexist in the route group. NI Switch Executive does not check for the exclusion conflicts or repetitive use of reserved for routing channels.

For best results, open your configuration in MAX, load all routes and route groups in the Routes/Groups tab, and run the validator and/or the test panel to verify your configuration.

Was this information helpful?