This shows you the differences between two versions of the page.
labs:explicithistory:expressionlanguage [2016/04/22] |
labs:explicithistory:expressionlanguage [2020/08/14] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Explicit History Expressions ====== | ||
+ | |||
+ | | {{: | ||
+ | |||
+ | ---- | ||
+ | |||
+ | > **Summary: | ||
+ | |||
+ | \\ | ||
+ | |||
+ | ===== Expressions===== | ||
+ | |||
+ | The Explicit History plug-in features its own brand of expression syntax, since the available scripting languages rarely support vector and point operators. The syntax of the Explicit History Expression language is similar to VBScript, but with several additions. | ||
+ | |||
+ | First, expression parsing is important when defining logical relationships between parameters. And the language outlined on this page is used both in the math components that deal with scriptable expressions and in some parameter types directly. All numeric and vectorial parameters expose a simple, one-line expression for post-processing any data that comes in. | ||
+ | |||
+ | For example, let's look at the Line SDL (Start, Direction, Length) component which takes a point, a vector, and a double. All these parameter types support inline expressions, | ||
+ | |||
+ | \\ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | \\ | ||
+ | |||
+ | You can either type in an expression in the menu textbox, or you can open the Expression Editor. If you are familiar with the syntax you can use the shortcut way of using the menu, but in the beginning it's better to use the editor since it informs you about errors in the syntax: | ||
+ | |||
+ | \\ | ||
+ | |||
+ | {{: | ||
+ | |||
+ | \\ | ||
+ | |||
+ | The editor displays a list of all the variables you can use (only " | ||
+ | |||
+ | If you change the expression, a red error message on the dialog box informs you what kind of syntax error was made. There is also a Preview button for testing your new expression. | ||
+ | |||
+ | The language comes with a bunch of predefined mathematical functions similar but more extensive than VBScript. | ||
+ | |||
+ | If you want to know more about the Expression language, you can run the hidden **_TestExplicitHistoryExpressionParser** command which features more information about syntax, available functions, and vector notation. | ||
+ | |||
+ | |||