2.2.4.31.1 OperationManager::FindOutgoingOperation

Description

Get the operation that is using specified datarange and x-function name as input.

Syntax

OperationBase&	FindOutgoingOperation(DataRange& dr, LPCSTR lpcszXFName);

Parameters

dr
[input] the input DataRange of the operation.
lpcszXFName
[input] the x-function name of the operation.

Return

a valid operation wrapper that represent the internal operation object

Examples

EX1

//Before run the following code, draw a 2d plot and do interp1xy operation.
//Find the operation in the project using the datarange and xfunction name.
void OperationManager_FindOutgoingOperation_Ex1()
{
	GraphLayer gl;
	gl = Project.ActiveLayer();
    if(gl)
    {
        // Use default constructor to create an uninitialized DataPlot.
        DataPlot        dp;
 
        // Now initialize it to be the first DataPlot in the layer:
        dp = gl.DataPlots(0);
		XYRange rg;
		if( dp.GetDataRange(rg) )
		{
			OperationManager opManager;
			opManager = Project.Operations;
			LPCSTR lpcszXFName="interp1xy";
			OperationBase&	opBase = opManager.FindOutgoingOperation(rg, lpcszXFName);
			if(opBase)
				out_str(opBase.GetName());
		}
    }
}

Remark

See Also

OperationManager::GetOperation

Header to Include

origin.h