AcMapExpression class

Land Desktop Development ARX CPP SDK

 

AcMapExpression class

Header file: MapArxApi.h.

Note  This class has new functions added for AutoCAD Map 3D 2005.

An instance of the AcMapExpression class is an expression, which you can use throughout an AutoCAD Map project. You use AcMapExpression to define, set, get, and execute an expression or manipulate template lines. An expression is a combination of operands and operators that evaluates to a single value. The same expression always evaluates to the same value. For more information about expressions, click Expression Evaluator on the Contents tab of AutoCAD Map Help.

Do not subclass from this class.

You call AcMapProject::DefineExpression to get an AcMapExpression pointer.. You are responsible for deleting the memory allocated for the object using the delete operator, as shown in the following example. For simplicity, the code does not show routine error checking.

char buff[132] ;
AcMapSession *mapApi = NULL ;
AcMapProject *pProj = NULL ;
AcMapExpression *pExpress = NULL ;
AcDbObjectId Id = 0 ;
 
AcMapValue Val ;
mapApi = AcMapGetSession();
mapApi->GetProject(pProj);
*buff = EOS ;
acedGetString (1, "Enter an expression: ", buff);
pProj->DefineExpression(pExpress, buff) ;
// Use the expression -- code not shown
delete pExpress ;