NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Additional data in ModelData.Testsockets[0].UUT

Solved!
Go to solution

I'd like to store additional data in the UUT. I have created the variable called Reference but It seems that I need to create a new UUT (Container) Type and replace it in the array. How can I do that? Shall I create a whole new model? 

 

Capture.PNG

Parameters.ModelData.TestSockets[Float64(Locals.CurrUUTData.Slot)].UUT.AdditionalData.Reference = Locals.currUUTReference. 

 

gives 

 

The post-expression for the step 'Statement' could not be evaluated.
Unknown variable or property name 'Parameters.ModelData.TestSockets[Float64(Locals.CurrUUTData.Slot)].UUT.AdditionalData.Reference'.

 

 

currUUTReference is reference to the UUTClass object.

0 Kudos
Message 1 of 3
(2,911 Views)

I can see that you're trying to include some additional UUT information in your test report, however I'm not familiar with your approach.

 

There is information about customizing your report here

          -  The section titled 'Logging additional UUT and Station data to the report header' should be helpful here.

 

There is also a similar forum post here

          -  Although the original questions mentions a database, the solution works for result collection and therefore will function the same for generating a report.

 

Hopefully these resources point you in the right direction!

0 Kudos
Message 2 of 3
(2,869 Views)
Solution
Accepted by topic author Heartbeat

I was able to store additional data using this procedure: 

 

Parameters.ModelData.TestSockets[CurrentSlot].UUT.AdditionalData.NewSubProperty("Foo", PropValType_Reference, False,"",0),
Parameters.ModelData.TestSockets[CurrentSlot].UUT.AdditionalData.Reference = Locals.FooReference

 

Or 

 

Parameters.ModelData.TestSockets[CurrentSlot].UUT.AdditionalData.SetValString("key",1,"value")

 

 

 

0 Kudos
Message 3 of 3
(2,864 Views)