hm_evaluatepythonexpression
Evaluates a Python expression.
Syntax
hm_evaluatepythonexpression python_string
Type
HyperMesh Tcl Query Command
Description
Evaluates a Python expression and returns a map (string of key values).
Currently only supported for PAM-CRASH profile.
Inputs
- python_string
- The Python string to evaluate.
Examples
To evaluate a Python expression:
hm_evaluatepythonexpression "R = 10 \npi = 3.142 \nArea = pi*R*R"
Errors
Incorrect usage results in a Tcl error. To detect
errors, you can use the catch
command:
if { [ catch {command_name...} ] } {
# Handle error
}
Version History
2021