NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

remove variable dynamically

Solved!
Go to solution

Is it possible to Remove a variable in runstate?

 

For example "Locals.ResultList[0].TS.SequenceCall"

 

To remove a resultfree sequence from report

 

In fact I have a sequence call that calls a sequence, I disabled "record results" of all steps in that sequence. But I need to show a result for the "Sequence Call" step itself which is already handled with parameters. TestStand stores an empty "ResultList" just for the subsequence, and it shows that a sequencecall occurred. Its not very fency and I would prefer to show only the result of the "sequencecall" step

 

Hope it's kinda clear 🐵

Jimmy

0 Kudos
Message 1 of 7
(4,504 Views)

Hi,

The ResultList is an array therefore you can use the PropertyObject.DeleteElements method to delete that result. Check out the help in the Programmers Reference.

 

Hope this helps you.

 

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 2 of 7
(4,494 Views)

Hi Ray,

unfortunately I tried this but the fact is the record result array is already empty. So that's why I was looking for completetly remove the mentionned container variable  "Locals.ResultList[0].TS.SequenceCall"

 

Is there a method like Locals.Variable.Remove ?

 

Thanks

Jimmy

0 Kudos
Message 3 of 7
(4,482 Views)

Hello Jimmy,

 

You can use the DeleteSubProperty method to do this.

With warm regards,

David D.
0 Kudos
Message 4 of 7
(4,476 Views)

I think I just don't understand how to spell it correctly.

 

I created Locals.Local

 

in a statement I put PropertyObject.DeleteSubProperty("Locals.Local",0) and it returns Error accessing PropertyObject Variable...

 

I tried Locals.Local.DeleteSubProperty("Locals.Local",0) and it returned Error accessing "Locals.Local"...

 

Thanks

Jimmy

0 Kudos
Message 5 of 7
(4,472 Views)

Hello Jimmy,

 

Locals.DeleteSubProperty("Local", 0) is what you are looking for. Check the help for DeleteSubProperty for a link to more information on lookup strings.

 

With warm regards,

David D.
Message 6 of 7
(4,468 Views)
Solution
Accepted by topic author JICH

It makes sens,

 

thank you very much guys

 

Jimmy

0 Kudos
Message 7 of 7
(4,465 Views)