LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

text content of variant indicator ?

Bonjour,

How can I get the text content displayed by a variant indicator, to write it to file for example ?

oz
0 Kudos
Message 1 of 6
(3,359 Views)
Hi OZ,

Communications>>>ActiveX>>>Variant to data
will convert a variant to any LV data type. Just wire a constant (i.e. string constant) of the correct type to the top and it will adapt to produce the data type you need.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 6
(3,359 Views)
Use the new LV 6.1 vi called convert to XML, this will expose the text
inside a variant indicator so that you can process it.

"Olivier Zimmermann" wrote in message
news:3C6403D2.1B4DC376@isn.in2p3.fr...
> Bonjour,
>
> How can I get the text content displayed by a variant indicator, to write
it to file for example ?
>
> oz
>
0 Kudos
Message 3 of 6
(3,359 Views)
This produces the error "Incompatible variant data type". If anyone does know the answer I'd be most grtaeful.
0 Kudos
Message 4 of 6
(3,359 Views)
When using LV 6i, I 've been looking for a way to programmatically read
the text displayed by a variant control/indicator. I tried using a
home-made type converter... but it seems there is no easy way, with that
version of LV.

Now with LV 6.1, you can use "Data Manipulation \ XML \ Flatten To
XML.vi" to obtain this text ; it is quite easy to parse then.


Anybody knows some other ways...? - oz

Deon a écrit:

>This produces the error "Incompatible variant data type". If anyone
>does know the answer I'd be most grtaeful.
>
>
0 Kudos
Message 5 of 6
(3,359 Views)
Hi,

I've spend a lot of time looking for this. Hacking into the data structure,
and converting it to string for each item seems the only way.

Regards,

Wiebe.

"Olivier Zimmermann" wrote in message
news:3DEE01E6.4070800@isn.in2p3.fr...
> When using LV 6i, I 've been looking for a way to programmatically read
> the text displayed by a variant control/indicator. I tried using a
> home-made type converter... but it seems there is no easy way, with that
> version of LV.
>
> Now with LV 6.1, you can use "Data Manipulation \ XML \ Flatten To
> XML.vi" to obtain this text ; it is quite easy to parse then.
>
>
> Anybody knows some other ways...? - oz
>
> Deon a écrit:
>
> >This produces the error "Incompatible
variant data type". If anyone
> >does know the answer I'd be most grtaeful.
> >
> >
>
0 Kudos
Message 6 of 6
(3,359 Views)