hwITemplex Evaluate

Mathematically evaluates a string and returns the result.

Syntax

hwITemplex_handle Evaluatemyexpression, type

Application

HyperWorks Tcl Query

Description

Returns a string indicating the evaluated output of myexpression.

Inputs

myexpression
The expression to be evaluated.
type
If set to ‘true’, ‘template’, or ‘templex’, the expression is evaluated using the Templex language. Otherwise, it is evaluated as a simple math expression.

Example

To evaluate the mathematical expression 1+sqrt(2):
hwi GetSessionHandle mySessionName
mySessionName GetProjectHandle myProjectName
myProjectName GetTemplexHandle myTemplexName
myTemplexName Evaluate "1+sqrt(2)" false

Errors

None.