LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Event Structure - Access Lock Front Panel option Programatically - VI Scripting

Solved!
Go to solution

Hi all,

 

I am actually having some ten VIs which has event structures with nearly 50 cases each. All those events on creating had the "Lock Front Panel" check box being True. I want to make that Boolean False in all the cases for some UI handling. I thought of writing a Scripting VI to modify the property but I was able to proceed only till the frames in the property node heirarchy and was not able to get the properties which defines a particular event. Does anyone had already tried this or Have a solution ?  The below image is my progress. Event Sturcutre Scripting.PNG

0 Kudos
Message 1 of 9
(3,183 Views)
You have 10 VIs, each with 50 controls? Forgive me for saying so, but it sounds like you have a lot bigger problems than how to turn off the screen locking.

Why do you need to turn it off on all 500 controls?

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 9
(3,150 Views)

I also couldn't find an answer for you but if you are using scripting to look for an object (Event Structure in this case) it is usually a lot easier to use the Traverse for GObjects VI.

 

http://zone.ni.com/reference/en-XX/help/371361L-01/glang/tref_traverse_for_references/

 

I'm not surprised there is no property under frames for this because Frames[ ] is a proprety of Multiframe Structures and most cannot lock the front panel.  I looked through the class browser and found a Event Locks Panel property for a user registered event but nothing equivalent for an event structure.  This may be something that you cannot do but I would be very interested to know if this can be done.

Matt J | National Instruments | CLA
Message 3 of 9
(3,117 Views)

Thanks for responding back.

 

My issue is like I load all those VI in a sub panel. I use a simple state machine architecture in all my VI including the top level VI where I load. A particular sequence of operation takes some 1minute plus time and in this time period if some other event is triggered in the front panel its getting locked. Its not allowing to do any operations even in the top level VI. So only I need it to be done for all the events which are handled in all my VI's.

0 Kudos
Message 4 of 9
(3,084 Views)
The correct solution is to.not have any GUI states that hat take more thanthan about 200ms. If something takes longer than that it should be in a separate vprocess.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 9
(3,080 Views)
Solution
Accepted by topic author Sarath_Kumar.T.G

Clear Panel Locks.png

"If you weren't supposed to push it, it wouldn't be a button."
Message 6 of 9
(3,026 Views)

Thank you so much for giving me the solution.

0 Kudos
Message 7 of 9
(3,006 Views)
Funny sort of "solution" that doesn't fix the problem.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 9
(2,998 Views)

Mike,

 

I will move the cases taking more time into seperate process to fix the issue. And whatever I needed to know on scipting, I have got a solutiion.

0 Kudos
Message 9 of 9
(2,985 Views)