How Do I Change Default Values in a LabVIEW Executable?
Primary Software: LabVIEW Development Systems>>LabVIEW Base Development System
Primary Software Version: 8.0
Primary Software Fixed Version: N/A
Secondary Software: N/A
I've created an executable in LabVIEW and want to change the default values of the controls, and the Data Operations»Make Current Value Default option is not available. How can I set and change the default values of the controls?
You can change the default values in your LabVIEW executable by using Configuration VIs to read and write to an ini file. The configuration shipping examples in LabVIEW 2009-2012: Read Configuration Settings File VI and Write Configuration Settings File VI show how this is accomplished. These can be found by navigating to the NI Example Finder, and then clicking on Fundamentals»File Input and Output. The examples in LabVIEW 2013-2017 are contained in the Configuration (INI) project: The Configuration (INI) project can be found in the NI Example Finder under Fundamentals»File Input and Output»Configuration (INI).
Default values can also be saved by writing them to a text or lvm file if you choose not to use the Configuration VIs. This has been demonstrated in NI Community: How to Save and Read Control Values Programmatically. The examples show how a user can use the Read from Measurement File VI alongside the Write to Measurement File to save the values of the controls. The values of the controls are merged together and saved to a specified file path. The user can then choose to read from that file the next time the VI is opened.
KnowledgeBase 43TFFGKG: Save Front Panel Objects' Default Value to File
NI Community: How to Save and Read Control Values Programmatically
Report Date: 03/13/2003
Last Updated: 10/15/2017
Document ID: 2VCDB8X8