From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read the content of the ResultList in a C# code module?

Hi,

 

How to read the content of the ResultList in a C# code module? 

 

public void LogUutData(Execution execution)

{

    PropertyObject propertyObjectResult = execution.ResultObject.GetPropertyObject("ResultList", PropertyOptions.PropOption_NoOptions);    

    for (int intCounter = 0; intCounter < propertyObjectResult.GetNumElements(); intCounter++)

    {

        object objResult = propertyObjectResult.GetValVariantByOffset(intCounter, PropertyOptions.PropOption_NoOptions);

       // How to read the content of objResult?

 

    }

}

 

I suppose the methods used in the code snippet are correct.
How do I have to handle an object to read the content, the information about this issue in the help file is really limited.

 

Does anyone know how to do this, or are there better alternatives to iterate through the ResultList, any help will be highly appreciated.

 

Best regards

0 Kudos
Message 1 of 4
(3,265 Views)

Hi, I was able to iterate through the Results Container but have som more questions,

 

Delegate defined:

 

m_ApplicationMgr.StartExecution += new _ApplicationMgrEvents_StartExecutionEventHandler(OnApplicationMgr_StartExecution); void OnExecutionViewMgr_EndExecution(Execution execution){      PropertyObject propertyObjectExecution = execution.ResultObject;}  

After execution ‘MainSequence’, event ‘OnExecutionViewMgr_EndExecution’ is fired

      ResultObject, Sub Property SequenceFile, is path statement for the current executed sequenceResultObject, Sub Property Sequence, is ‘MainSequence’ResultObject, Sub Property ResultList is a container with the results for logged steps. Question: This result container does not contain information about the limits, how to add the limits to the result container? 

After execution ‘Execute SinglePass, event ‘OnExecutionViewMgr_EndExecution’ is fired

     ResultObject, Sub Property SequenceFile, is path statement for processmodel?ResultObject, Sub Property Sequence, is ‘Single Pass’ResultObject, Sub Property ResultList contains nothing? Question: How to make sure this ResultObject contains information about the current executed sequence, I do need information about the processmodel?

 

Any help will be highly appreciated

 

Best regards

0 Kudos
Message 2 of 4
(3,243 Views)
Better formatted this time... Hi, I was able to iterate through the Results Container but have som more questions; Delegate defined: m_ApplicationMgr.StartExecution += new _ApplicationMgrEvents_StartExecutionEventHandler(OnApplicationMgr_StartExecution); void OnExecutionViewMgr_EndExecution(Execution execution) { PropertyObject propertyObjectExecution = execution.ResultObject; } After execution ‘MainSequence’, event ‘OnExecutionViewMgr_EndExecution’ is fired ResultObject, Sub Property SequenceFile, is path statement for the current executed sequence ResultObject, Sub Property Sequence, is ‘MainSequence’ ResultObject, Sub Property ResultList is a container with the results for logged steps. Question1: This result container does not contain information about the limits, how to add the limits to the result container? After execution ‘Execute SinglePass, event ‘OnExecutionViewMgr_EndExecution’ is fired ResultObject, Sub Property SequenceFile, is path statement for processmodel? ResultObject, Sub Property Sequence, is ‘Single Pass’ ResultObject, Sub Property ResultList contains nothing? Question2: How to make sure this ResultObject contains information about the current executed sequence, I do need information about the processmodel? Any help will be highly appreciated Best regards
0 Kudos
Message 3 of 4
(3,240 Views)

Another try,

 

I was able to iterate through the Results Container but have som more questions;

 

Delegate defined:

 

m_ApplicationMgr.StartExecution += new _ApplicationMgrEvents_StartExecutionEventHandler(OnApplicationMgr_StartExecution);

 

void OnExecutionViewMgr_EndExecution(Execution execution)
{
    PropertyObject propertyObjectExecution = execution.ResultObject;
}

 

After execution ‘MainSequence’, event ‘OnExecutionViewMgr_EndExecution’ is fired

 

ResultObject, Sub Property SequenceFile, is path statement for the current executed sequence
ResultObject, Sub Property Sequence, is ‘MainSequence’
ResultObject, Sub Property ResultList is a container with the results for logged steps.

 

Question1: This result container does not contain information about the limits, how to add the limits to the result container?

 

After execution ‘Execute SinglePass, event ‘OnExecutionViewMgr_EndExecution’ is fired

 

ResultObject, Sub Property SequenceFile, is path statement for processmodel?
ResultObject, Sub Property Sequence, is ‘Single Pass’
ResultObject, Sub Property ResultList contains nothing?

 

Question2: How to make sure this ResultObject contains information about the current executed sequence, I do need information about the processmodel?

 

Any help will be highly appreciated

 

Best regards

0 Kudos
Message 4 of 4
(3,230 Views)