NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

AddExtraResult Requirements

Solved!
Go to solution

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

0 Kudos
Message 1 of 5
(3,699 Views)
Solution
Accepted by topic author kevin.key

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!

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
Message 2 of 5
(3,656 Views)

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)

 

 

Regards
Ray Farmer
0 Kudos
Message 3 of 5
(3,587 Views)

Step.TS.Requirements.Links worked like a charm. But I can't seem to find how you can see that from the Expression Browser. When I expand step I don't see the TS container.

0 Kudos
Message 4 of 5
(3,582 Views)

TS is a hidden property and you have to go into Station Perferences / Station Options (cant remember which) to allow you to see them.

Regards
Ray Farmer
0 Kudos
Message 5 of 5
(3,576 Views)