LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

preventing text and label editing

Hi,

I was wondering if there is any way to prevent a user from editing control labels and text, when the program is NOT running.

Thanks!
0 Kudos
Message 1 of 5
(3,049 Views)

If you go to VI Properties (press Ctrl-I) and go to the Security page, you can change the lock state of your VI to either "Locked" or "Locked (with password)".  Both of these settings prevent any editing from occurring on the VI.  If you set your VI to the "Locked" state, you can un-lock it by pressing Ctrl-M.  You can only unlock a password-protected VI by entering the correct password.

There is no way to only lock the editing of certain things like labels...you can either lock the whole VI or keep it unlocked.

-D

0 Kudos
Message 2 of 5
(3,038 Views)

Check Change to Run Mode from the Operate menu.

You can also set the program to run when it's opened (File>>VI Properties>>Execution) and close it when you finish, so the user won't have a chance to do anything, but then you will need to place it as a subVI inside another VI if you want to edit it.

The best way, in general, is to build it into an executable (Tools>>Build Application...), and then you can run it on any computer which has the RTE. You can even create an installer for it.


___________________
Try to take over the world!
0 Kudos
Message 3 of 5
(3,035 Views)

If you want to prevent ANY modifications, then you can password protect it. Go to VI Properties>Security to set a password. CAUTION: If you forget the password, there is no way to unlock it. You could create an exectubable from your VI if you have the app builder. You could also save a copy (repeat COPY) of VI without a diagram. I'm not a big fan of this though as it prevents the VI from being loaded in a newer version of LabVIEW.

You could also set the VI to Run When Opened and remove the toolbar to eliminate the Abort Execution button. Then, have a "Stop" button on the VI and call the Exit LabVIEW function when the VI stops. However, anyone who knows something about LabVIEW can get around this.

If you just want to prevent the editing of labels, the only way that I know of is to load the captions from a file once the program starts but I really don't see the point of just protecting labels and not the whole program.

0 Kudos
Message 4 of 5
(3,033 Views)
That does the trick. Thanks!
0 Kudos
Message 5 of 5
(3,031 Views)