LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

converting OLE variants in a FileSystemObject script

I am currently exploring the scripting power of labview and have some serious issues with converting a simple OLE variant to a LV datatype. I also tried with OpenG tools. Take a look at my example script
The ActiveX reference to FileSystemObject works with windows XP and maybe some older windows operating systems. Thanks
Aart-Jan
0 Kudos
Message 1 of 3
(3,047 Views)
aartjan,

OpenG Data Tools are for LabVIEW Variant data only. AcviveX Variant is a totally different beast under the same clothes.

However, the solution to your problem is simple. The variant type VT_R8 tells that it is a 8 byte real value, e.g. a LabVIEW double. You simply use "Variant to Data" to convert it to a LabVIEW double. See the attached VI. Also notice the use of "Format into String" to generate the string, a node that is much more convenient to use than string concatenation.


LabVIEW, C'est LabVIEW

Message 2 of 3
(3,047 Views)
thank you Jean-Pierre
I was trying to use the variant to data tool, but got stuck on the idea I had to feed it the right datatype. Thanks for the clear explanation and tips.
Aart-Jan
0 Kudos
Message 3 of 3
(3,047 Views)