Import and Export an NI MAX Configuration Through LabVIEW

Updated Sep 8, 2022

Environment

Software

  • LabVIEW
  • Measurement & Automation Explorer (MAX)

I know I can import or export my NI MAX configuration in Measurement & Automation Explorer, but is there a way to do this in LabVIEW?

Yes. Depending on the version of NI MAX you have installed, there are two possible ways to do this.

NI MAX 4.7 and later:

You can use the System Configuration API VIs which allows you to programmatically import and export your NI MAX configuration from LabVIEW. In LabVIEW you can find Export.vi and Import.vi on the block diagram under Measurement I/O»System Configuration. You can use these VIs to import configuration data from a file into NI MAX or export configuration data from NI MAX out to a file.

For example, to export your current NI MAX configuration to file, you would wire the session in input either with a System Configuration I/O control or with a string input of the hostname of your system, such as localhost. Then, you could wire the destination input with C:\MaxConfig.nce.

Note: This functionality is available for LabVIEW 8.5 and later. 

NI MAX 4.1 through 4.6.2:

You can use the NI MAX Configuration API. In LabVIEW you can find the NI MAX Copy Configuration VI on the block diagram under Measurement I/O » MAX Configuration. You can use this VI to import configuration data from a file into NI MAX, export configuration data from NI MAX out to a file or copy configuration data directly from system to system.

For example, to export your current NI MAX configuration to file, you would wire the source input with system://localhost and the destination input with C:\MaxConfig.nce. It is also very imperative that examine capitalization and formatting in accordance with the help file as this VI is very strict when selecting inputs.

Note: This functionality is available for LabVIEW 8.0 and later.
 

For examples on how to use these VIs, please check the NI Example Finder and search for Export MAX Configuration.vi and Import MAX Configuration.vi, these include the best practices on to handle the system configuration session.