LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the type of the data in a variant

Solved!
Go to solution

Hi,

 

how could I grab the text highlighted with yellow in the picture below?

 

Thx.

 

1984_0-1667467104432.png

 

0 Kudos
Message 1 of 27
(2,358 Views)

You should know the data type of the variant and convert from Variant to data.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 27
(2,350 Views)

Please dont troll away my question by writing completely irrelevant answers, even if that looks tempting to you. Thanks.

Message 3 of 27
(2,330 Views)

It may happen to misunderstand a question (it happened many times to me), please don't be so rude. We are all volunteers.

Now, concerning your question, you can take a look at the Get Type Information vi, in the Data Type Parsing palette (subpalette of the Variant palette). Not exactly what you are asking, but I hope not too far...

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 4 of 27
(2,324 Views)

I don't know of a way to get the type text from the Variant indicator (scripting possibly?), but you could use the Get Type Information VI from the Data Type Parsing palette to identify the data type then generate your own text dependent on the type.

 

Variant indicator data type.png

Andy

0 Kudos
Message 5 of 27
(2,319 Views)

@PsyenceFact wrote:

Get Type Information VI


+1

Get Type Information VI is the way to go.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 27
(2,308 Views)

@1984 wrote:

Please dont troll away my question by writing completely irrelevant answers, even if that looks tempting to you. Thanks


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

 

Thanks for letting me know that my answer not satisfied your question.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 7 of 27
(2,304 Views)

I didnt want to be rude, but if I'm asking about the time then receiving an answer about the weather is not relevant.

 

I'm aware of the Get Type Information VI but that's not the same as if eg: you convert a cluster to a variant then the Type output enum only says "cluster" and doesnt tell anything about the structure of the cluster. Same with arrays. It doesnt tell you if its an I32, or a U8 array it simply returns "array". Not to mention any more complex data structures.

0 Kudos
Message 8 of 27
(2,296 Views)

 


@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.

 

0 Kudos
Message 9 of 27
(2,290 Views)

Explore the Data Type Parsing palette and you will find VIs for getting information on arrays, clusters, numerics etc.

Lucian
CLA
0 Kudos
Message 10 of 27
(2,281 Views)