Example Code

Programmatically Save Current Values As Default

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
To Restore the Default Value of the Called VI

Description:
In order to save a VI's current values as default, the VI must be in edit mode. In order to do this we utilize a VI reference and call the Make Current Values Default method. An important item to note is that we set the Wait Until Done input to the Run VI method to True. This ensure that we save the final values, after the VI has completed running, as the default values.

Instructions:
To implement this example:
  1. Define the directory of the subVI path
  2. Run the VI to restore the default value of the VI

To execute this example:

  1. Install the required software.
  2. Open the VI and refer the Implement Steps


Requirements
Software
LabVIEW 2012 or compatible

Hardware
-

bd.PNGfp.PNG

**This document has been updated to meet the current required format for the NI Code Exchange.**
National Instruments
Senior Systems Engineer

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
hbs_80
Member
Member
on

If only one item in the control pannel is wanted to be saved as default, how would it be?