03-15-2023 05:50 AM
hi,
how can I get all station globals variables teststand api C# ?
thanks
03-15-2023 05:59 AM
Hi, brother,
I think there is something you want in this post:
03-15-2023 07:53 AM
Hi brother
I have already seen it but I did not find how to get all the Station Golobals variables dynamically without knowing their names before ?
03-15-2023 09:01 AM
I think you can try this:
PropertyObject globals = engine.Globals;
string sLastUser = globals.GetValString("TS.LastUserName", 0);
Console.WriteLine($"the last user is: {sLastUser}");
It gets a property object containing all global variable information, then you can do some things, such as reading the value of a global variable
But I don't know how to get all the variables in the object