Example Code

Programmatically Lock and Save a VI Using LabVIEW

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
This example shows how to lock and password protect a VI programmatically using the VI-server architecture

 

Description

Programs/VIs can be programmatically password protected and saved by using VI Invoke Nodes. The user has to input the direct path of the VI they are locking and saving. Additionally, you have to set the password before running the VI. This section of code could be placed in existing applications to lock and save the program.

 

Requirements

LabVIEW 2012 (or compatible)

 

Steps to Implement or Execute Code

  1. Choose the path to the VI you would like to lock
  2. Choose a Password for the VI
  3. Run the VI. 

 

Additional Information or References

 

Block Diagram

Programmatically_Lock_Save.png

 

 

**This document has been updated to meet the current required format for the NI Code Exchange.**

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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