03-25-2013 12:03 PM
I’v read some good posts here, like http://forums.ni.com/t5/LabVIEW/How-do-you-create-a-cluster-in-C-for-use-in-a-NET-assembly/m-p/84392.... I don't have problem on getting structure contains structure from .net assembly, but I could not pass a structure contains structure to a .net assembly in LabVIEW. The detailed description follows:
I’m trying to pass information to a .net assembly which takes a parameter of structTest, but failed. Somebody please shed light on the problem. A simple demo LV vi is most preferred.
The definition of structTest is as following:
Structure structTest
Dim int32TestProcedureIpn As Int32
Dim strTestProcedureRev As String
Dim strTestProcedureDesc As String
Dim bPassed As Boolean
Dim strOperatorName As String
Dim strComments As String
Dim arstResults As structStepResult() (Here is issue)
End Structure
arstResults is an array used to keep test results of each test step. Each test step results is defined as following:
Structure structStepResult
Dim int32StepNo As Int32
Dim strFailureDesc As String 'can be test step description
Dim bPassFail As Boolean
End Structure
Thanks a million!
03-26-2013 10:09 AM
03-27-2013 04:58 PM
Thank you very much CarmenC.
I realized that I mixed up type identifier. Eventually I decided to split the structure parameter and modified the test results from array to arraylist (.net assembly was modified first). My LabVIEW program to assign value to parameter is like the following:
Because the .net assembly performs other tasks, when they did not work, I found out that LabVIEW copies the assembly to user's AppData folder and made System.Reflection.Assembly.GetExecutingAssembly().Location returns unexpected information. Hope this could be help to someone.
03-27-2013 05:01 PM
I found the image could not be viewed clearly and only know how to post a full picture.