06-24-2011 01:27 PM
Hey,
I want to use the RunState.Execution.AddExtraResult (http://zone.ni.com/reference/en-XX/help/370052H-01/tsapiref/reftopics/execution_addextraresult_m/) method to add a Step's Requirements to the result list. I'm calling this with a propertyName="Step.Requirements" and a resultPropertyName="Requirements", but I'm not seeing the information being added to the ResultList.
I am using this to add Step.Limits and Step.Comp successfully. It seems like I'm using the wrong property name for the Requirements, but I can't find a list of property names anywhere.
Thanks,
Kevin
Solved! Go to Solution.
06-27-2011 08:21 PM
Hi Kevin,
The Requirements are actually stored as an array in Step.TS.Requirements.Links. Try using this statement instead of simply Step.Requirements in your function, and please let me know if this works. For future reference, if you open the Expression Browser, you can view many of the available run-state variables as well as API functions for TestStand. I hope this helps, Kevin! Have a great day!
06-28-2011 01:01 AM
Hi,
Step.Requirements has a Read only attribute and you read this to get a PropertyObject reference to the Requirements property.
eg
PropertyObject links = step.Requirements.GetPropertyObject("Links", 0);
int nextAvailableIndex = links.GetNumElements();
links.SetValStringByOffset(nextAvailableIndex, PropertyOptions_PropOption_InsertElement, "REQ_ABC");
(this is an extract from the online help for TestStand)
06-28-2011 07:25 AM
06-28-2011 08:45 AM
TS is a hidden property and you have to go into Station Perferences / Station Options (cant remember which) to allow you to see them.