03-31-2020
12:13 AM
- last edited on
12-23-2025
10:40 AM
by
Content Cleaner
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.
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
10-25-2021 02:07 AM
Were you able to find the method of doing this post 8.6? Would be greatly appreciated.
10-25-2021 09:39 AM - edited 10-25-2021 09:40 AM
@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.
10-25-2021 02:25 PM
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