NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Clone ResultList to a container rather than PropertyObject

I am trying to modify a ResultList in the TestReport Callback to customize a Report, but want to keep the original state for the rest of my Process Model Execution Entry Point (mainly for PostUUT Callback).

 

I can't create at design time a variable of type Result.

I can't create at run-time a variable of type Result.

I may clone the Result array to a PropertyObject, but I may not use this PropertyObject the same way I would with a Result array in the default Process Model.

  • For example, if I have clones to a variable: Locals.ModifiedResultList, Locals.ModifiedResultList.TS has a value in the watch pane at debug time, but PropertyExists("Locals.ModifiedResultList.TS") evaluates to false.

I can't pass my ResultList by value instead of by Reference in an attempt to unmodify the original copy of the data in the Callback.

 

I am now thinking of having my PostUUT prior to TestReport callback, which I think should work, but I was hoping for a cleaner outcome.

 

I am missing something obvious?

 

Thank you,

 

Mathieu Daigle

Certified TestStand Architect

Averna

0 Kudos
Message 1 of 3
(3,384 Views)

Hi Mathieu,

 

Not 100% clear on what you are trying to do but can't you just use

 

Locals.tmpResultList = Locals.ResultList and then work with tmpResultList.

 

 

Regards
Ray Farmer
0 Kudos
Message 2 of 3
(3,373 Views)

Thanks Ray for your post which lead me to a solution on my side.

 

What I want to do? Well without entering in details, I use my ResultList in two places, TestReport and PostUUT Callbacks. I want to modify this ResultList in one case and leave it untouched for the other.

 

I had a brain lag forgetting I could just copy paste a ResultList array for a Locals.ResultList somewhere and put it in TestReport Callback (I just don't know why the Result type is so hidden and not usable to create a variable). That being done, = assignation effictively copies the data and allows to modify the copy without modifying original content.

 

OK, this might not be 100% clear, but oh well, it works now.

 

Thanks again,

0 Kudos
Message 3 of 3
(3,347 Views)