NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom run time error message into C# UI

Hi,
 
I'm trying to get the error message for the last step into my C# UI (using TestStand3.5).
I've tryed the GetRunTimeErrorMessage in the UIMsg_Trace message event, but it doesn't work.
Probably I should use the PostStepRunTimeError callback instead? Is there a sample code available in C# using it?  
 
 
0 Kudos
Message 1 of 2
(3,215 Views)
I'm getting the error code and the message, se below, but I also want to get the location info as in the standard TS error popup.
The boolean Occurred parameter seems to be false even if I get an error. Is it reset to false or something? 
 

int

frameID = 0;

errorCode = axExecutionViewMgrs[index].Thread.GetSequenceContext(0,

out frameID).AsPropertyObject().GetValNumber("Parameters.ErrorLoad.Code", 0);

details = axExecutionViewMgrs[index].Thread.GetSequenceContext(0,

out frameID).AsPropertyObject().GetValString("Parameters.ErrorLoad.Msg", 0);

location = axExecutionViewMgrs[index].Thread.GetSequenceContext(0,

out frameID).AsPropertyObject().GetValBoolean("Parameters.ErrorLoad.Occurred", 0);

 
0 Kudos
Message 2 of 2
(3,206 Views)