取消
显示结果 
搜索替代 
您的意思是: 

Creating large .NET Array

已解决!
转到解答

My vendor requested a .NET assembly from me, a quite simple application in LabVIEW. The output of my method should be a 2D Array with over 1.0000.000 elements, i.e. [4][250000]. Passing a LabVEW array to .net doesn't work directly, so I have to create a .NET array programmatically, based on the LabVEW array. You can see on the snippet, how I do it. It is working, but... the To .NET Object.vi takes too long, and the conversion time for all the 1M element is not acceptable - neither for me nor for the vendor. 

Is there any faster way to do that? Or is there any other way to pass the array from LV to .NET?

 

CreateDotNetArray.png

0 项奖励
1 条消息(共 5 条)
1,997 次查看
0 项奖励
2 条消息(共 5 条)
1,975 次查看
解答
接受人 Madottati

2D dotNET Array Bench.png

 

This returns TRUE. I didn't test 250000, because the 'old' method takes forever.

 

Both types are System.Double[,], so it seems to me they are the same.

0 项奖励
3 条消息(共 5 条)
1,966 次查看

Hey, it is easier as I thought 😄  

I have done this, now I am waiting for reply from the .NET developer. On my side it works, the resulting .NET array has the same content as the LabVIEW array. 

 

Thanks!

 

 

CreateDotNetArray_2D.png

0 项奖励
4 条消息(共 5 条)
1,962 次查看

@Madottati wrote:

Hey, it is easier as I thought 😄  


Sometimes you get lucky!

0 项奖励
5 条消息(共 5 条)
1,956 次查看