NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit FileGlobals form C# code

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

 

0 Kudos
Message 1 of 4
(2,718 Views)

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,

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 4
(2,685 Views)

I'm trying to set fileglobals of an executing sequence file 

Thanks 

0 Kudos
Message 3 of 4
(2,660 Views)

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. 

Adena L.
Technical Support Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,641 Views)