NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

StepID

IVI,

 

this will not work.

Additional Results are not part of the Result-container of a step. So the lookup string is not correct.

So in your code, the line testid = stepPropertyObject.GetValString("Result.AdditionalResults[\"Requirements\"]", 0); will always throw an error (unknown property).

You have to go a different way. One possible is:

a) Get the last entry in the ResultList.

b) Get the Additional Result there.

 

So it looks something like this:

PropertyObject seqctxPropertyObject = seqctx.AsPropertyObject();

PropertyObject Resultlist = seqctxPropertyObject.GetPropertyObject("Locals.ResultList", 0);

int LastEntry = Resultlist.GetNumElements() - 1;

testid = seqctxPropertyObject.GetValString("Locals.ResultList[LastEntry].AdditionalResults[\"Requirements\"]");

 

hope this helps,

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 11 of 12
(670 Views)

I think you can also use Step.LastStepResult and/or Step.CurrentLoopResult.

 

-Doug

0 Kudos
Message 12 of 12
(657 Views)