NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Delete FileGlobal variable from all the sequence files opened

I wish to delete a FileGlobal variable through TestStand from all the sequences which are opened or from all the sequence files which are present under project or workspace. I don't want to open each file and then delete that variable from there. Do we have anyway of deleting that FileGlobal variable from all sequence files on few clicks.

0 Kudos
Message 1 of 9
(2,261 Views)

Hi rtingase,

 

If you mean from the Variables window (FileGlobals), so you can choose the first variable and pressing the Shift button to choose the last one, then press/choose to delete. With this action, the whole Global variables will be deleted from all sequences.

 

EdgarU_0-1624438990859.png

 

Best Regards,

Edgar Umrikyan.

0 Kudos
Message 2 of 9
(2,210 Views)

I don't want to delete all the FileGlobal variables.

I want to delete single FileGlobal variable (eg- FileGlobals.EngineHours) from multiple sequences which are opened in TestStand.

0 Kudos
Message 3 of 9
(2,206 Views)

You need to perform it manually for every sequence.

 
0 Kudos
Message 4 of 9
(2,162 Views)

Here is a sequence file that shows how to create a fileglobal on the fly (in this case a boolean), as well as delete it.

 

create "test" fileglobal:

Locals.TemporaryObjectReference = RunState.Engine.NewPropertyObject(PropValType_Boolean,False,"",0), //Create new property Object
Locals.TemporaryObjectReference.AsPropertyObject.Name = "test",
FileGlobals.InsertSubProperty("",0,0,Locals.TemporaryObjectReference) // Insert property into station globals

 

delete "test" fileglobal

FileGlobals.DeleteSubProperty("test",PropOption_DeleteIfExists)

 

Hope this helps...

0 Kudos
Message 5 of 9
(2,117 Views)

If I use this way, then I need to go in each sequence file and run these steps to delete variable. If I have 100 files with variable, then repetition of these steps will be time consuming.

 

Anyways, Thanks for your reply!

0 Kudos
Message 6 of 9
(2,109 Views)