LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get Pict Ring Images from EXE

So lets say I have on my UI a picture ring.  From within my EXE, I'd like to be able to get the images of each state of the picture ring.  I have a few hacky like options but none make me happy.

 

Parse the Type Def control:  This method involves reading path to the type def picture ring, then using either LoadResFile or a similar function, to find the PNG images in the file.  For this to work I'd need to always have my picture rings be type defs, and I'd need to make sure that disconnecting type defs in the EXE aren't done.  Oh and I'd have to have a Load Resource File that works outside of the IDE (this I already have).

 

Use Get Image Method:  This would have my code use the control as it is, then change its value to each of the possible states, then taking an image of the control with that value until I've gotten them all.  This is the way I planned on going, except I have an issue, how do I know what is the maximum value for the picture ring?

 

Given a picture ring control reference, is there a way to know the number of images loaded into it programatically, and from within an EXE?  I'm so surprised at how the picture ring is seemingly incomplete for so many years.  I get that it isn't used all that much, but not being able to read the images in it, set the images in it, or even query how many values it has, seems crazy.

 

Oh and there is another option I don't care too much for, and that is to get the images when in the IDE by running the VI, and then have those images included in the EXE.  Thanks.

 

EDIT:  Okay finally found the Number Of Items Property so that method will work.

0 Kudos
Message 1 of 1
(2,940 Views)