07-29-2013 08:08 AM
Hello,
I'm trying to create an "assembly interop.net " that contains imaq functions. This dll will be called from a c#.net application .
I've managed to do an "assembly interop.net" dll before that takes clusters in parameters, and it worked perfectly. But now when I try to pass images as parameters,
The images is interpreted as a "Refnum" type (I don't know what data type is that ). and when I try to build the dll I got this error message:
L'erreur -2628 s'est produite à : Nœud de méthode dans DatatypeXML_From_Control.vi->AB_ExportedAssemblyVI_Define_VI_Prototype.vi->AB_InteropAssembly.lvclass:Open_Top_Level_VIs.vi->AB_Build.lvclass:Build.vi->AB_Application.lvclass:Build.vi->AB_InteropAssembly.lvclass:Build.vi->AB_Build.lvclass:Build_from_Wizard.vi->AB_UI_Frmwk_Build.lvclass:Build.vi->AB_UI_FRAMEWORK.vi->AB_CreateNewWizard_Invoke_CORE.vi->ABUIP_CreateNewWizard_Invoke.vi->ABUIP_CreateNewWizard_Invoke.vi.ProxyCaller
Raisons possibles :
LabVIEW: Une erreur s'est produite lors de l'analyse du document.
Please tell me if you have any idea about this subject.
07-29-2013 11:40 AM
If you need the image data, you need to convert the image to an array. The purple wires in LV are mearly pointers to memory. They do not contain image data in them. Converting the image to an array also insures that a race condition does not inadvertantly alter the image before you have a chance to process, or display it, if some other functions are acting on the image pointed to by the reference.
07-30-2013 02:54 AM
Hello, and thanks for your help,
I actually managed to make the dll and call it from c#. But the problem is I don't know how to reference an image from labview to c#.
As I have understand this type (NationalInstruments.Labview.Refnum.LVBaserefnum) is the equivalent of image class in c# but I didn't accept it when I pass an image object insteat of LVBaserfnum object)
So Can you tell me how can I convert the LVBaserefnum type to an image class?
Thanks again