01-11-2018 05:54 PM
Hi all,
I've been banging my head against the wall on this and I'm wondering if anyone can help me out.
I'm writing a TestStand plugin that uses the "Model Plugin - OnTheFly Step Results" entry point.
What I'm trying to do is iterate over each element in Parameters.Results and check for the presence of an additional result with a specific name. Say for example, "SpecialAdditionalResult". Then I want to retrieve the value of "SpecialAdditionalResult".
I've gotten as far as
Parameters.Results[Locals.i].GetPropertyObject("AdditionalResults",0)
...but then once I have the property object, how do I access an additional result by name?
I'm thinking it has to be something simple that I'm missing...
Thanks very much,
Mr. Jim
Solved! Go to Solution.
01-11-2018 08:57 PM
Try this:
Parameters.Results[Locals.i]->AdditionalResults[Locals.Foo]
Where Locals.Foo = SpecialAdditionalResult and is a String. However, if it doesn't exist it will throw an error. So you may want to do a propertyexists on it first.
or this will work too:
Parameters.Results[Locals.i]->AdditionalResults[Locals.j].Name
01-12-2018 09:09 AM
Ah, I knew I was missing an operator! It's been too long since I've used C++.
Last night when I was staring at it too long I was thinking, "That seems to be a pointer. How do I get the thing it points to?"
Thanks a lot Jiggawax!