NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to Get Step.Result.ReportText in operator interface

Hello all:
I met a problem: I want to get report text of every step in operator interface. I use TS_StepGetProperty method but it seems there is not property ID indicate report text. Can you help me, Thanks advance!

regards
Cheng Zhang
0 Kudos
Message 1 of 2
(3,047 Views)
ReportText is a custom step property, not a static step property. Thus there is not a "hard coded" function to access it. Here is some code that should work:

// error checking omitted
void foo(CAObjHandle step)
{
char * reportText = NULL;
VBOOL exists;

TS_PropertyExists(step, NULL, "Step.Result.ReportText", 0, &exists);
if (exists)
{
TS_PropertyGetValString(step, NULL, "Result.ReportText", 0, &reportText);

// use reportText here
}

CA_FreeMemory(reportText);
}
0 Kudos
Message 2 of 2
(3,047 Views)