From 12:00 AM CDT Sunday, October 17 - 11:30 AM CDT Sunday, October 17, will be undergoing system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Modify local variables with C# dll

Go to solution
 void AppMgr_UserMessage(UIMessage uiMsg)





    switch ((int)uiMsg.Event)


      case 10200: //update the UI to reflect the current progress

        progressBar.Value = (int)uiMsg.NumericData;

        label.Text = uiMsg.StringData;



      case 10201: //Close the form, cleaning up the AppMgr Reference

        AppMgr = null;         this.Close();




      case 10202: // Send text to the calling Test Stand App

        label.Text = "10202";

        uiMsg.AsPropertyObject().SetValString("Locals.opText", 0, "Something");





This is some code from your Floating .Net panel example

In the last case above I am trying to modify one of Test Stand's local variables. I think it is probably not sensible to cast uiMsg as a PropertyObject the way I have here.

I think it is more likely that I will have to pass the variable I want to modify from Test Stand to the DLL.

Not sure how to do this, any ideas ?



0 Kudos
Message 1 of 4
Accepted by krugman2

Hi Krugman2,


To do this you need the coresponding SequenceContext!

Try uiMsg.Thread.GetSequenceContext(0,frameId).AsPropertyObject()


Maybe this thread could be interresting:





NIWeek 2017: Standardized HIL Test Automation With TestStand
NIWeek 2016: Capturing ATE Requirements With Requirements Gateway

Feedback or kudos are welcome
Message 2 of 4
That worked well, thanks
0 Kudos
Message 3 of 4

Bonjour, Est ce que il y a une possibilité de recuperer la version de test dans testStand et l'afficher dans une textbox en c# sachant que j'utilise le c#

0 Kudos
Message 4 of 4