08-24-2006 03:57 PM
08-24-2006 04:25 PM
08-24-2006 04:51 PM - edited 08-24-2006 04:51 PM
Message Edited by Bob Y. on 08-24-2006 04:54 PM
08-25-2006 09:01 AM
I tried your suggestion and it doesn't work. I attached the test sequence that I created for reference. Basically the first step has 2 requirements in the requirements list and the second step is a ActiveX adapter action step that attempts to retrieve the value of the 1st requirement of the previous step. I am using Runstate.PreviouStep to get to obtain a reference to the step, and the getvalstring method of the PropertyObject class to get to "TS.SData.Requirements.Links[0]". Here is the error message I get from the engine:
An error occurred calling 'GetValString' in 'PropertyObject' of 'NI TestStand API 3.5'
A subscript is not valid for objects that are not arrays. The subscript '[0]' could not be applied.
Error accessing item 'TS.SData.Requirements.Links[0]'.
By putting a breakpoint on step 2 and looking at the contents of RunState.Sequence.Main["Statement"].TS.SData.Requirements in the watch expression window I can see that Links is an empty string.
Any suggestions to get this to work?
08-25-2006 10:17 AM
Hi,
You have the PreviousStep as the reference so you will need to obtain propertyobj ectreference by using the method Step.AsPropertyObject. This is going to give you grief as you are looking at the Previous Step and you will have to introduce another step in between your two steps.
Instead use RunState.PreviousStep.TS.Requirements as the reference. Now you can use PropertyObject.GetValString. You will also have to change the lookup string to just "Links[0]".
See attached JPG.
Regards
Ray Farmer
08-25-2006 01:29 PM
Got it. I attached the result of this post as an attachment. The attachment is a modified sequential model for TestStand 3.5 that will add the list of unit requirements for each step of each sequence (when the Links array is not empty) to the Step.Result container, and set the IncludeInReport flag to true. The modifications are in the ProcessModelPostResultListEntry callback sequence of the sequentiqal model. By default this callback is disabled and can be enabled by turning on on-the-fly reporting, or manually. There is a knowledge base article on how to implement that manually: http://digital.ni.com/public.nsf/allkb/C65305FE996E28F98625704700006C6F.
Thanks for the help
08-26-2006 12:09 AM
08-26-2006 03:42 AM - edited 08-26-2006 03:42 AM
Hi,
Allen is right you should also try to use any dedicated method, therefore in my example I have modified it to use the Step.Requirements.
Regards
Ray Farmer
Message Edited by Ray Farmer on 08-26-2006 09:43 AM
08-27-2006 12:10 AM
08-28-2006 06:47 AM