LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Method of setting control given label and value

Solved!
Go to solution

No, that doesn't look like what I have in mind.  I want to set the value of the control to value given only its name.  Both name and value are strings.  As in the first reply to the post only it doesn't matter if you use This VI or another VI reference.

0 Kudos
Message 11 of 16
(1,271 Views)

@kc64 wrote:

No, that doesn't look like what I have in mind.  I want to set the value of the control to value given only its name.  Both name and value are strings.  As in the first reply to the post only it doesn't matter if you use This VI or another VI reference.


That will only work if the target object is a string data type. For other data types there would be confusion for example your pass the string "101" to a numeric that is set to display as HEX do we interpret the string as "101" "5" "65", ...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 16
(1,248 Views)

Right.  So without having some property for the control as to its type, it is impossible to cast it to the correct type from a string without providing this direction externally.  I think the best option in my case will be to store everything as a string and cast it at usage time to the correct value.  Now that I say that, I wonder if the value could be stored as a variant and recovered using the type descriptors.  The only way I know how to do that is by using OpenG's LabVIEW Data Tools but I don't have a license to deliver that in a product. 😞

0 Kudos
Message 13 of 16
(1,238 Views)

Here is a Nugget I wrote to help out in this area of thought.

 

I am not telling you to do it that way. Just "giving you enough rope to ..."

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 16
(1,230 Views)

kc64,

you mentioned:

 


@kc64 wrote:

 The only way I know how to do that is by using OpenG's LabVIEW Data Tools but I don't have a license to deliver that in a product. 😞


 

What is the limitation you have not to use the OpenG toolkit inside a product?

The OpenG toolkit is licensed under the BSD license and that should put no limitations on redistributing besides an acknowledged notion in the about/readme/release notes.

You don't have to purchase a license to use and redistribute the toolkit.

 

Ton

 

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 15 of 16
(1,206 Views)

@Ton--

 

Well, that's a good question.  I had some idea that there was a more restrictive license that allowed for personal use (not for profit) but I suppose that I confused this with something else.  I tried to find the license that I recalled but could not.

 

Thanks.

0 Kudos
Message 16 of 16
(1,168 Views)