Preventing Save Prompts for Unedited VIs

Updated Apr 14, 2020

Reported In

Software

  • LabVIEW

Issue Details

Every time I change a Type Def, all calling VIs appear with an asterisk when opened and prompt to be saved when they are closed, regardless of whether any explicit changes were made. Why is this happening, and how can I avoid this behavior?

Solution

While no explicit changes have been made to the front panel or block diagram, modification of a type def does affect the compiled code stored within the VI. 

This behavior can be avoided by separating the compiled code from the VI.

Additional Information

LabVIEW VIs can be thought of as including four components: front panel, block diagram, data, and compiled code. Changes to any one of these components will prompt the VI as a whole to be saved.

Updating a Type Def typically will not cause unsaved changes to the front panel, block diagram, or data, but it does require that the compiled code be updated. Separating the compiled code from the source VI moves the compiled code component to a separate compiled object cache, reducing the number of instances that prompt for unsaved changes.

Separating compiled code from source files does affect the load time of a VI for its first execution, as compilation will be performed at runtime. This can be mitigated by performing a Mass Compile before running the code.