Table of Contents

Method Evaluate

Namespace
OpenCAD2D
Assembly
OpenCAD2D.Core.dll

Evaluate(string, IReadOnlyList<GeoPoint3>)

Evaluates an expression whose points cur are given.

public static CadCalcValue Evaluate(string expression, IReadOnlyList<GeoPoint3> picked = null)

Parameters

expression string

The expression.

picked IReadOnlyList<GeoPoint3>

The points cur takes, in the order the expression names them; null where it names none.

Returns

CadCalcValue

The value.

Exceptions

CadCalcException

Thrown when the expression is wrong, in AutoCAD's words.

Evaluate(string, IReadOnlyList<CadCalcValue>)

Evaluates an expression whose inputs are given.

public static CadCalcValue Evaluate(string expression, IReadOnlyList<CadCalcValue> answers)

Parameters

expression string

The expression.

answers IReadOnlyList<CadCalcValue>

What Inputs(string) lists, in that order: a vector for a point or an object snap, a number for a radius.

Returns

CadCalcValue

The value.

Exceptions

CadCalcException

Thrown when the expression is wrong, in AutoCAD's words.

Evaluate(string, IReadOnlyList<CadCalcValue>, CadCommandSession)

Evaluates an expression whose inputs are given, in a drawing: getvar reads the system variables the session knows, and w2u and u2w change points between the world coordinate system and the session's current user coordinate system.

public static CadCalcValue Evaluate(string expression, IReadOnlyList<CadCalcValue> answers, CadCommandSession session)

Parameters

expression string

The expression.

answers IReadOnlyList<CadCalcValue>

What Inputs(string) lists, in that order: a vector for a point or an object snap, a number for a radius.

session CadCommandSession

The command line of the drawing; null for none, as the other overload: no variable is known and the user system is the world one.

Returns

CadCalcValue

The value.

Exceptions

CadCalcException

Thrown when the expression is wrong, in AutoCAD's words.