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
(1,636 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
(1,585 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
(1,581 Views)

You need to perform it manually for every sequence.

 
0 Kudos
Message 4 of 9
(1,537 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
(1,492 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
(1,484 Views)

Use this VI over each SequenceFile with appropriate FileGlobal value (without the FileGlobals. prefix)

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 7 of 9
(1,458 Views)

I could not open this VI because I am using LabVIEW 2017.

I think this VI is made in newer version.

0 Kudos
Message 8 of 9
(1,441 Views)

Hey rtingase,

 

Please find the VI in attachment, I saved it based for LabView 2017.

0 Kudos
Message 9 of 9
(1,363 Views)