LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW scripting: highlight VI in project tree

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.

0 Kudos
Message 1 of 5
(3,383 Views)

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. 

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

But ProjectItem class does not have such method... Could you, please, tell where could I find it?

Project Item Invoke Node.pngProject Item Property Node.png

0 Kudos
Message 3 of 5
(3,347 Views)

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.

0 Kudos
Message 4 of 5
(3,340 Views)

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.

Message 5 of 5
(3,336 Views)