03-15-2007 09:05 AM
03-21-2007 04:28 PM
Hi Rob,
Sorry about the delayed reply. I have been working on this problem and I was able to replicate your issue. As such, it appears not to work correctly in TestStand currently.
I have reported the issue to our TestStand R&D team.
The workaround for the situation is, as you proposed, to pass the structs separately. While this may not be optimal for you, it is an effective solution and will get your application working again.
Matt M.
NI
11-27-2007 01:11 PM
Bob,
I've done this kind of thing in the past before. Your suspicions were correct in that you must create the complex structure in your .NET assembly before hand. You can then create a Test Stand variable of that type and pass it as a parameter to your .NET function. The only caveat is that all my stuff is done in C# so I don't really have an example in VB .NET. Nor have I ever done so with a structure quite like that which you are using. But, like I said, I've done some things that are very similar before so it still seems like what you are trying should be do-able without throwing the error you describe.
Let me know if you've found a sloution. If not, maybe I'll dig out an old example to show you. Even though it is C# you still should be able to follow it.
11-28-2007 08:00 AM
Thanks, John, for your feedback.
First let me note that I'm satisfied with passing each array of clusters as individual parameters to my .NET method - so this isn't a critical issue for me at this point. Nevertheless, let me clarify that most of the complex data structures that I've needed to pass between TestStand and .NET code modules have worked exactly as expected. This problem seems to specifically affect a data structure that is comprised of a cluster containing multiple arrays of different clusters. TestStand (at least version 3.0) appears to be unable to correctly store the data type of each of the underlying clusters - so it assumes they are simply "object references". Regardless of whether I let TestStand create the data type or whether I specifically create the data type, the problem persists.
If you have a C# example of what I have mentioned, I would be interested to see it. (I actually prefer C# - VB .NET is simply what I am expected to use at work.) And I don't believe the language used would affect this issue... MSIL is MSIL.
Thanks,
Rob