OpenSite/Concepts/Expressions
Jump to navigation
Jump to search
Choose the expression language explicitly and track whether its result is current.
Choose a language
| Native formula | Python expression | |
|---|---|---|
| Language | formula |
python
|
| Execution | Restricted document evaluator | Shared embedded interpreter |
| Example | object(id).width * 2 |
document.get_object("Beam").width * math.cos(math.radians(30))
|
| Consent | No Python consent required | Enable first; recalculate separately |
| Opening a file | Uses model formula semantics | Retains source without silent execution |
Keep dimensions compatible
A length expression must produce a length, not a pressure. Poisson ratio is dimensionless and may use a compatible scalar result. The leading = in the property UI is a formula marker; it is not a Python assignment statement.
Understand the execution lane
Console, editor/debugger and Python property evaluation share one interpreter and lane. Do not queue a competing calculation while it is busy or paused.