07-29-2018 07:58 AM
Hello, I'm trying to use this command:
ExecutuionRunSates.SequenceFile.FileGlobalsDefaultValues.SetValString("Name");
to Set FileGlobals using C# code in Visual Studio,but I keep getting this error :
NationalInsturments.TestStand.Interop.API.ExecutionRunSates' does not contain a definition for
'SequenceFile'
Thanks
07-30-2018 08:47 AM
ExecutionRunStates is an enum. It only contains 3 items:
https://zone.ni.com/reference/en-XX/help/370052R-01/tsapiref/reftopics/executionrunstates/
Of course it wouldn't contain a sequence file.
Are you trying to set the fileglobals of an executing sequence file or of a sequence file that is opened but not executing? There are different ways to accomplish either.
Regards,
08-07-2018 01:06 PM
I'm trying to set fileglobals of an executing sequence file
Thanks
08-08-2018 04:20 PM
Hi Areeg,
You access file global variables using RunState.SequenceFile.Data.FileGlobalDefaults.myVariable. You will insert the name of your variable in place of "myVariable". You can then set this variable equal to your desired value.