12-10-2012 07:45 AM - edited 12-10-2012 07:46 AM
Hi,
I'm trying to send an image from C# to labview by using Interoperability.
I have a bitmap variable in c# and i want to pass it on labview. But i have to use Imaq and the only way i found is to save this one one hdd, but this solution is very very long...
How can i generate an Imaq from C# and pass it with interop ?
You'll find in attatchment my vi and interop dll.
Thanks a lot.
I'm using LV2012, VS2010 and C#
12-18-2012 03:09 AM
Hi Seb,
If you're question is about how to use Interoperability with LabVIEW, you'll find several tutorials in the links below that teach you how to do so :
>> Building a .NET Interop Assembly (Windows)
>> How to Add a LabVIEW .NET Interop Assembly to the Global Assembly Cache
>> How Do I Use a LabVIEW DLL in Microsoft Visual Studio.NET?
>> Interoperability (C# Programming Guide)
Was it what you were looking for?
Have a nice day
Marc-Junior
12-18-2012 03:25 AM
Hi Marc,
Kind of, yes.
I already know how use generic fonction with interoperability such as Dot product, Multiply, and other.
But my real problem is, how can i use Imaq from C# ? For other function i'm using only simple type like double or array.
In my case, i must save bmp on hdd and load it after, in my LV code... Not really efficient and little long.
12-18-2012 04:20 AM
Ok it's a different question then. The best method for that would be to use the NI-IMAQ Function Reference Help that you'll find in a place that looks like that : C:\Program Files (x86)\National Instruments\NI-IMAQ\Docs
If the drivers are not yet installed on your computer you can download it from there : NI-IMAQ Function Reference Help
There also are some exemple that may help you and should be installed on your computer : C:\Users\Public\Documents\National Instruments\NI-IMAQ\Examples
I hope this helps,
Have a nice day,
Marc-Junior
12-18-2012 04:50 AM
All of exemple in C:\Users\Public\Documents\National Instruments\NI-IMAQ\Examples are very interesting. (unfortunately, no much reference about it on the net)
But i can't find any refnum to use as parameter for an interop function.
Is it in the ImaqSession ?
Thanks a lot.
12-18-2012 04:53 AM - edited 12-18-2012 04:53 AM
Mistake 🙂
I'm trying to use Imaqdx; Then ImaqdxSession.