2.2.4.38.49 Project::NewOperation

Description

Create a new operation will specified class name

Syntax

OperationBase * NewOperation( LPCSTR lpcszClassName, LPCSTR lpcszPath, BOOL bAddToOperationList = TRUE )

Parameters

lpcszClassName
[input]operation name
lpcszPath
[input]file path
bAddToOperationList
[input]defaut value is TRUE

Return

Returns the pointer of operation object.

Examples

void Project_NewOperation()
{
	OperationBase* pOperation;
	string strFileName = GetAppPath(true) + "OriginC\\Originlab\\FitNL.cpp";
	string strClass = "FitNL";

	//create an operation and add to project's operation list
	pOperation = Project.NewOperation(strClass, strFileName); 
	Project.DeleteOperation(pOperation);
}

Remark

See Also

Project::DeleteOperation, Project::GetOperationObject, Project::Operations

Header to Include

origin.h