LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to modify programmaticaly a custom control

Hi,

I was wondering if it was possible to modify programmaticaly a custom control.

This custom control is a ring, which text values will change a lot in the future, depending on the user. (could be string1, string2, string3 or A_String, B_String for instance)

Because I don't know what will be these text values, I planned to have these values stored in a text file, then I wanted to have a VI that will read the text file, extract the text values and modify the custom control (using string[] property node)

I tried to do that, but it was unsuccessful...

Can someone help me?
Is there an other way to answer my problem, other than using a custom control??
thks for answering

Zib
0 Kudos
Message 1 of 5
(3,144 Views)
Well, I can assure you that it works. Are you really trying with a Ring Control or rather an enum? Since the values of enums are compile time defined you can't change them during runtime. Just think about what LabVIEW would have to do if you wired the enum value to a case selector input. That would mean self modifying code!
If you really have a ring control the way you describe it really should work and I would think that you have some other errors going on. Try to debug your program in single step mode, to see where it goes wrong.

Rolf K
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 5
(3,144 Views)
Here's alittle proposal of how to initialise a ring control if you still want to use this kind of control. I also include with my answer a VI that converts a textfile to a 1D array of strings which can be used to modifiy the ring.

Hope this helps !

Julien
Download All
Message 3 of 5
(3,144 Views)
Hi Jumarion,

Really good examples.

Sanaa TAZI
Application Engineer
National Instruments
0 Kudos
Message 4 of 5
(3,144 Views)
Thank you very much indeed Sanaa.
Forgive me if the comments are in French in the VIs.
I try to do my best to answer to the questions but I've read some of your answers and I really can't reach your level...

Thank you anyway for your rating, I'm gonna become an enthusiast pretty soon if you help me like this.

Please feel free to correct my answers if you think I'm wrong.

Regards,
Julien
0 Kudos
Message 5 of 5
(3,144 Views)