LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why under .NET the Event Callback doesn't fire events which have a 2D-array as parameter?

Hallo,
I have noticed that the VI "Reg event callback" in LabVIEW 8, doesn't fire .NET events when as parameter is given a 2D array. To transfer such a parameter from my Assembly to Labview i have to build a helper class and pack such an array in that class. That's annoying.
Is it impossible to use events with array-parameter of more than one dimension? Such a helper class which has an array as parameter is more complicated than standalone array.
If I use such a component in my Visual Studio programm, all goes OK.

Fragment from my source code:
    // That goes through processes and fires the event (Reg event callback)
    public delegate void EventSimple(int _number);

    // That goes too
    public delegate void EventArrayDouble(double [] _array);

    // That doesn't go !! why?
    public delegate void EventArrayDouble2(double [,] _array);

    // That goes - the only way to transfer my 2Darray is to pack it in such a class (The array is public property of that class)
    public delegate void EventHelpClass(HelpClass _cla);

As attachement is the component (VS2003Std) and VIs (subfolder BadTestEvents\bin\Debug)

Thank you for any explanation
Pawel
0 Kudos
Message 1 of 3
(2,681 Views)
Well, I have to say you have discovered a bug I was unaware of. I'll do some digging to figure out what is going on, but I'm afraid in the meantime that your workaround is the best plan for now.
0 Kudos
Message 2 of 3
(2,667 Views)
I realized I never reported back on this issue and I must apologize. However, the problem did turn out to be a bug, but in the .NET framework. If you run the same VI under .NET 2.0, everything works fine.
 
Again, my apologies for forgetting to report back.
0 Kudos
Message 3 of 3
(2,608 Views)