10-27-2010 02:48 PM - edited 10-27-2010 02:52 PM
Use RunState.CallingStep.Result.Numeric for the Measured Value. Oops, missed your first reply.
Like I mentioned before, re-evaluating the DataSource changes the context of the expression. I can't think of a good way off-hand to circumvent that issue.
10-28-2010 11:14 AM
You might want to do something more like this:
Locals.MyMessage += ((PropertyExists("RunState.CallingStep.Limits.UseLowExpr") && RunState.CallingStep.Limits.UseLowExpr) ? "Minimum Value: " + RunState.CallingStep.Limits.LowExpr + "\n" : "")
Similarly for the measurement you could do:
Locals.MyMessage += (PropertyExists("RunState.CallingStep.Results.Numeric") ? "Measured Value: " + Str(RunState.CallingStep.Results.Numeric) : ""
Hope this helps,
-Doug
10-28-2010 11:19 AM
Actually I just thought of something much simpler that you might prefer. You can let TestStand figure out the description for your as follows:
Locals.StepDescription = RunState.CallingStep.GetDescriptionEx(StepDescOption_Long)
The string you get back will include all of the details you see in the description column for the step if you had tracing turned on. For numeric limits this includes the limits and the measurement value.
Hope this helps,
-Doug