LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX DLL and Variants

Hi
does anybody know if there exists a faster way to pass Arrays of doubles between VisualBasic (ActiveX DLL) and LabView? An array of doubles apears in LabView always as a variant and therefor the speed is slow.
 
Thanks for helping.
 
0 Kudos
Message 1 of 3
(2,576 Views)
The Variant really isn't going to slow down the transfer. LV arrays are not the same as VB arrays (which through COM are passed as SafeArrays). Thus to make the call, we need to create an instance of a SafeArray and copy the LV array into it (and back out if the parameter is marked in/out or out). If the array size is very large, this can get expensive. Unfortunately, if you want to access the array data in both languages, then there isn't any other solution - the data types are just different and thus require the copy.
0 Kudos
Message 2 of 3
(2,540 Views)

LabVIEW does a better job of typing .NET arrays.  Have you tried creating a .NET .dll from the ActiveX one? There's a free command line tool for this from Microsoft:

http://stackoverflow.com/questions/4284797/how-to-extract-typelib-from-a-com-exe-on-command-line

Be sure to run it as administrator.

 

-D

0 Kudos
Message 3 of 3
(2,145 Views)