06-24-2009 10:42 AM
Hi,
I have a custom PreBatch callback in TS 4.0 that populates serial numbers, part numbers, etc. for the UUTs being tested (using a Batch model). These variables are found in the PreBatch parameters. However, I cannot figure out how to access these values in other callbacks (SequenceFilePostStepFailure, for example).
In the PreBatch sequence, I can access the serial number for UUT4 using Parameters.ModelData.TestSockets[4].UUT.SerialNumber. But I cannot find the ModelData object when not in PreBatch and have tried looking in root, runstate, main, sequence, etc., without any luck.
Any thoughts?
Thanks,
Chris
Solved! Go to Solution.
06-24-2009 10:48 AM
You can find it at:
RunState.Root.Parameters.ModelData
It will only exist at runtime and only when you are actually running using the batch model.
Hope this helps,
-Doug
06-24-2009 11:27 AM
Perfect, exactly what I needed. For others who come across this question: it only exists at runtime and therefore doesn't show up in TestStand's auto-complete when typing it in. But I ran it and it correctly accessed the variables.
Thanks Doug!
Chris
02-26-2020 03:02 AM
Hi,
In Teststand 2012, Batch Model, I try the solution in MainSequence unseccessfully !
As I run to the step to use "Runstate.root.parameters.ModelData.TestSockets[0].UUT.SerialNumber to Access the TestSocket_0 's SerialNumber , An Error appears for unknowed parameter Runstate.root.parameters.ModelData . Does someone has a seccessful demo for it.