NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

reading the description of a particualar step

Hi,
 
As we see, every step is associated with some description, in case I want to save that description in a custom report of mine, where should I search for it.
 
Regards,
Sreedhar.
0 Kudos
Message 1 of 6
(3,378 Views)
Sorry, I forgot to mention the other things, I also want to know how to get the Comments and Flow Properties of a particular step in the runtime.
0 Kudos
Message 2 of 6
(3,376 Views)
TSreedhar:
 
You can get the information you need using the following API methods and properties:
 
Step.GetDescriptionEx.
Step.GetExecutionFlowString.
PropertyObject.Comment.
 
Check the attached example (TS 3.0 sequence file)
 
Hope it helps.
 
Antonio Lie.

Message Edited by Antonio Lie (NI) on 04-05-2006 10:19 AM

0 Kudos
Message 3 of 6
(3,366 Views)

Hi Antonio,

 

Does it mean that I need to write these four steps of ActiveX action to get the info for every step in the main sequence...

 

Regards

Sreedhar

0 Kudos
Message 4 of 6
(3,349 Views)
Sreedhar,
 
In order to customize your report you have to insert three new properties under Step.Result. You can insert these new properties by adding an engine callback,
SequenceFilePostResultLiatEntry, into the sequence file. This callback is called immediately before any Results are added to the ResultList.
Inside the callback you need to use ActiveX steps to call the following API methods:
 
Comment:
 
1. Parameters.Result.SetValString("Comment", 1, CommnetOf(Parameters.Step))  ->Property is added to the Step's Result.
2. Parameters.Result.SetFlags("Comment",0,0x2000) -> Enables the IncludeInReport flag.
 
Description:
 
1. Parameters.Step.GetDescriptionEx(Locals.Description, 0) -> Gets the step description (notice that you have to add a new local variable called Description).
2. Parameters.Result.SetValString("Description", 1, Locals.Description) -> Property is added to the Step's Result.
2. Parameters.Result.SetFlags("Description",0,0x2000) -> Enables the IncludeInReport flag.
 
Flow:
 
1. Parameters.Step.GetExecutionFlowString(Locals.Flow, 0) -> Gets the step execution flow string (notice that you have to add a new local variable called Flow)..
2. Parameters.Result.SetValString("Flow", 1, Locals.Flow) -> Property is added to the Step's Result.
2. Parameters.Result.SetFlags("Flow",0,0x2000) -> Enables the IncludeInReport flag.
 
Check the attached example (TS 3.0 sequence file)  for more details.
 
Hope it helps.
 
Antonio Lie
0 Kudos
Message 5 of 6
(3,338 Views)

Thanks Antonio,

 

This will definitely work for me...

 

Regards

Sreedhar

0 Kudos
Message 6 of 6
(3,318 Views)