NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

.net module. What is a name on an assembly instance

Hi,

 

Let assume I have a sequence consisted of two .net action steps.

 

The C# code of first step is like below:

 

namespace Common
{
    public class Addresses
    {
        public string add = "192.168.1.5";
        public string name = "IP Address";
        public int nbr = 3;      
    }
}

 

I instantiate this class like as below and as a return I have a reference to in TestStand.

 

ts001.PNG

 

And now, the question. What is a name of the .net object invoked externally from TestStand in the .net domain?

 

I'd like to access the module instantiated like that from the second .net step, but not by using the referece holding by TestStand but utilising .net space/environment with reflection.

 

In Visual Studio, if I'd instantiete this object I have a name I gave to this object, so I have a handler in .net space. In TestStand I have a reference to it, that is fine. But what is a name in .net space of the object instanciated externally by TestStand?

 

 

0 Kudos
Message 1 of 2
(3,668 Views)

I'm not sure what you are trying to do, but it really should be much simpler than that. In your second .NET step you can just pass in the reference to the object created in the first step. Just store it in a local variable in TestStand and pass that local variable as a parameter to your second .NET step.

 

Maybe if you show me the code for your second step I'll have a better idea of what you are trying to do.

 

Hope this helps,

-Doug

0 Kudos
Message 2 of 2
(3,643 Views)