LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the type of the data in a variant

Solved!
Go to solution

@1984 wrote:

 


@PalanivelThiruvenkadam wrote:

my reply was completely based on body of your post. i failed to refer your Subject.

Uhm... No. Your answer had nothing to do with the body of my post as my question was super clear: how can I grab text highlighted in yellow? Your answer had nothing to do with grabbing the text highlighted in yellow. If you dont know the answer thats fine (me neither, thats why I've asked), but then you should not respond.

 


Are you okay?  Do you need a hug?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 11 of 27
(1,786 Views)
Solution
Accepted by 1984

Sadly this information is processed by the gui just to be readable and can not be accessed programatically imho.

As you said by yourself, getting the information it is a cluster, it needs to be extracted and processed again.

I added a vi for you, I hope that helps to get the basic idea.

Message 12 of 27
(1,773 Views)

Sorry, there is no way to programmatically access the string in the variant indicator; except for the following:

  1. You can get an image of the indicator.
  2. You can instruct the user to click on the text, then get a reference to the object with key focus (which will be the text object you want).
"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 13 of 27
(1,759 Views)

@billko wrote:

@1984 wrote:

 


@PalanivelThiruvenkadam wrote:

my reply was completely based on body of your post. i failed to refer your Subject.

Uhm... No. Your answer had nothing to do with the body of my post as my question was super clear: how can I grab text highlighted in yellow? Your answer had nothing to do with grabbing the text highlighted in yellow. If you dont know the answer thats fine (me neither, thats why I've asked), but then you should not respond.

 


Are you okay?  Do you need a hug?


🤣 🤣

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 14 of 27
(1,741 Views)

Theoretically, this should work (but it doesn't):

vt.png

Of course it's still possible that if you put the right magic values in the array, you might get what you want.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 15 of 27
(1,728 Views)

If you want to get kludgy, try this.

"If you weren't supposed to push it, it wouldn't be a button."
Message 16 of 27
(1,697 Views)

Also we can invoke the "save terminal image" (something like that) method and then do OCR with vision builder. I guess t.n.14 nailed the solution, just need a bit of a recursion.

Message 17 of 27
(1,675 Views)

I was deliberating with myself for a while if I should post this. But here it is. It's literally the exact thing that was asked for initially.

 

Get Variant Text.png

Warning:

 

This is calling an officially undocumented LabVIEW function. It should be present since around LabVIEW 8.20 or so. As an undocumented function NI has the right to change or remove this function at any point in the future and it may therefore crash, sing a lullaby or or eat your hard drive if you are unlucky. Test very well before you decide to use this in anything but experimental code!

Rolf Kalbermatter
My Blog
Message 18 of 27
(1,634 Views)

Hi rolfk, it does not work for me with LV2020:

raphschru_1-1667771838317.png

 

0 Kudos
Message 19 of 27
(1,626 Views)

That's what you get for quickly posting without in depth tests. This one works on my system. I had been using this function in some experimental C code a while back and quickly transferred it to a VI. 

 

 

Rolf Kalbermatter
My Blog
Message 20 of 27
(1,575 Views)