From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,193 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,160 Views)

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

Thanks 

0 Kudos
Message 3 of 4
(2,135 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,116 Views)