LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Scripting Boolean Button Decal Images

Hi

I have a application where there are a number of custom images for boolean controls.

I am getting tired of updating / managing them, and would like to automate it. 

 

I found this link and updating the 6 images still works in LV2019. 

https://forums.ni.com/t5/LabVIEW-APIs-Discussions/Set-TRUE-FALSE-Image-of-a-boolean-control-automati...

 

However the tip strips are in binary. 

 

Ideally what I would like to do is have a spreadsheet

 

OutputControlName, ControlTemplate, Description, Tip Strip, Decal Image, True Image, False Image, x-size, y-size

LEDs.ctl, defaultbutton.ctl, "LED control","Control the LEDs","","LEDsDisable.png","LEDsEnable.png", 60,60,

 

That then takes a control as a template and applies the picture items, boolean text and description and tip strip to it, and repeats for all rows of the spreadsheet. Then I can just give our image templates to the customer so they can change them if they don't like what we have done. I then just run the script again and all the buttons are sorted. 

 

Is there a newer/better way to achieve this, as post above is now 10 years old. I had a look here and its more focused on VI scripting than controls. https://www.ni.com/docs/en-US/bundle/labview/page/common-vi-scripting-tasks.html

Or should I just modify the 6 button example above?

 

Another question - if I don't want need all 6 button image options - Just True and False, do I still still write all 6, do I just the first two?

 

Regards

Nick

 

Message 1 of 4
(3,100 Views)

Were you able to find the method of doing this post 8.6? Would be greatly appreciated.

Certified LabVIEW Architect
0 Kudos
Message 2 of 4
(2,399 Views)

@PWoodward wrote:

Were you able to find the method of doing this post 8.6? Would be greatly appreciated.


This works for changing the images.

"If you weren't supposed to push it, it wouldn't be a button."
Message 3 of 4
(2,375 Views)

Hi Paul, thanks for the VI, I tried with the attached png (expand.png) on all button images on the ctl attached (expand.ctl) but it produced a corrupted ctl (expand-image.ctl) that couldn't be opened or used on a FP. Could you point me to what I'm missing?

 

I'm using LV 2018 currently.

 

Thanks

Certified LabVIEW Architect
Download All
0 Kudos
Message 4 of 4
(2,339 Views)