LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

set vi icon invoke node

The invoke node in LV7.0 (windows) has a Get vi icon and a Set vi icon property. The Get vi icon works just fine (can save bitmaps to files etc). But I can't get the Set vi icon to work. Even if i wire the output from one Get vi icon directly to the input of a Set vi icon, nothing happends. What am i doing wrong?

Thanks
0 Kudos
Message 1 of 9
(3,475 Views)

Without an example it will be hard to say.

Let me guess;
Properies of that type (anything you would be temppted to save after setting it) can not be manipulated when the VI is running or reserved to run.

I have posted a crude example of two VI's.

Download both.
Open both.
Observe icons of both.

Set the file path on the FP of the "Set Icon" to the path of your target.

Run Set icon.
Observe the icon of the target has now changed.

I hope this helps,

Ben


Ben Rayner
Certified LabVIEW Developer
www.DSAut
omation.com

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Download All
0 Kudos
Message 2 of 9
(3,475 Views)
Thanks

I think my problem was that i didn't understand how the function-node worked. What i was trying to do was to 're-icon' several bunches of files while re-naming them in LV. I have several source files that was to be copied to a lot of target files with slightly different names and correspondingly icons (using the picture tool).

It worked when using the invoke node to load the FP, then set the new icon, then use the save instrument node and finally close FP node (not sure if i actually have to load FP?). I thought the Set Icon node would actually 'Set' the icon, it didn't occur to me that the vi had to be saved for the icon to stick.
0 Kudos
Message 3 of 9
(3,475 Views)
invoke node save instrument.

without diagram is false.

I do not think loading FP is required.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 9
(3,475 Views)
What do you mean false? First I copy the files in LV with the file-copy subroutine, then I re-icon them programmatically with invoke node as i described, works just fine. If there's a better way i would love to hear about it, as i have never used these invoke nodes to programmatically change vis before.
0 Kudos
Message 5 of 9
(3,475 Views)
The save method invoke node lets you detemine if the diagrams are saved.

I was just trying to alert you to a possible complication.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 9
(3,475 Views)
Thanks, but i'm still confused. Is it possible to only save the FP and not the diagram?
0 Kudos
Message 7 of 9
(3,475 Views)
Yes!

A VI can be saved without its diagram!

This is the equivalent (in C) of;

Compile and link my code and delete the source code when done.

This is usually bad.

Experiment with a sacrificial VI first.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 9
(3,475 Views)
I didn't know that. Thanks a lot. (Should be a big warning on that node).
0 Kudos
Message 9 of 9
(3,475 Views)