NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

passing a string from c# to RunState.Root.Locals.UUT.SerialNumber at NI

Thank U all,

Finally I have succeeded.

On NI side:

 

I pass the object reference of RunState.Root.Locals.UUT by the expression "RunState.Thread.PostUIMessageEx(10203,RunState.TestSockets.MyIndex,"main",RunState.Root.Locals.UUT,True)"


on c# side:

 

if (e.uiMsg.Event == (NationalInstruments.TestStand.Interop.API.UIMessageCodes)10203)
{
        string myNewSerialNumber   ="123456789";            

        PropertyObject myArrayVariable = (PropertyObject)e.uiMsg.ActiveXData;
        myArrayVariable.SetValString("SerialNumber", 0, myNewSerialNumber);

}

 

 

0 Kudos
Message 11 of 11
(1,331 Views)