05-17-2018 05:39 AM
Dear LabVIEW community,
let me ask you about the following.
How to programatically highlight VI in project tree? For library and class there is method "Hilite in Project Window" (wondering, why it is not "Highlight", but "Hilite"). But how to do the same for simple VI?
I've checked forum, different shortcut menu plugins, but couldn't find such implementation. The only what is close to it, is Delacor's functions, when after adding new user event, main method is highlighted in the project tree - but source code VIs are closed, anyway.
Could anyone help with it, please?
Thanks a lot in advance,
Sincerely, kosist90.
05-17-2018 08:16 AM - edited 05-17-2018 08:24 AM
Use project items - From a project property node, get a reference to the project root, then call owned items on the root reference. That will give you all the items in the project (including VIs) as project items. From there, you have a variety of methods for matching the project item to the VI you want, and then you can use the 'HiliteInProjectWindow' on the project item.
Edit - Nevermind, that doesnt work.
05-17-2018 08:26 AM - edited 05-17-2018 08:26 AM
But ProjectItem class does not have such method... Could you, please, tell where could I find it?
05-17-2018 08:40 AM
No, it doesn't have that method - I wasnt paying attention and wired a project item to a property node that already had that method selected, and didnt notice that it broke the VI, because as you said that method isnt supported for that class. Sorry, my mistake.
05-17-2018 08:58 AM
Okay, there is a 'SelectItem' method on the project item class that I think gets what you are looking for, however it is a private method - cannot be used in run time or real time. You have to enable private properties in your LabVIEW ini file - I believe adding the line 'SuperSecretPrivateSpecialStuff=True' to your ini file does it. Note that these properties are unsupported by NI.