03-29-2017 01:05 AM
HI LV experts out there :),
I run into a problem i couldn't understand recently..
My task is to make some UI changes to a large amount of VI's (more than 300..)
So i was trying some LV scripting to help me.
many of the objects in the FP's i want to modify are locked,
After some googling I found the pane -> unlock objects method
I wrote a small script and a test case with some locked objects.
What I couldn't understand was -
When I obtained the reference to the target VI with "Static VI reference" it worked fine
But when I used the "open VI reference" with a path input - nothing happens and no errors are returned.
Attached are the example VI's
Can anyone explain how can i make the unlock objects method work using a reference obtained with the "open VI reference"?
P.S. I am using LV 2016
Thanks,
Barukh
Solved! Go to Solution.
04-07-2017 10:36 AM
Hi Barukh,
Are you still having issues with this? I downloaded your VIs, and the scripting seemed to work on my end. The only change I made was the file path reference to match where I saved your VIs. I ran both Unlock Objects and Lock Objects with both Open VI Reference and Static VI Reference and saw the same behavior in each case. Is it possible that your file path was to a different VI?
04-07-2017 12:15 PM
Hi Madison,
For other reasons it seems that it would be unavoidable to go over each VI manually.
After your answer I retested the VI's on my end, on different paths on my PC and the problem seem to persist.
I Forgot to mention it on my previous post, but the problem occurs when I run Unlock Objects and unlock test is closed. If unlock test is open in edit mode the unlock method works fine.
Barukh
04-10-2017 09:58 AM
Hi Barukh,
Thank you for the clarification. I was able to reproduce the issue when unlock text.vi was closed. I was able to fix this by adding a Save.Instrument method at the end of Unlock objects.vi. I believe when you dynamically call the VI and it is not in the current application instance, you need to explicitly save the VI in order to see any changes the next time you open it. Let us know if that worked.
04-11-2017 09:24 AM
Yes adding save.instrument method works fine. It makes much more sense now.
Thank you very much for your help and explanation.
Barukh