On this page you will find explanations about how to use expressions in the headless environment. Expressions in general are already described on this page here.
Within the history API we're able to create, update and delete expressions.
Depending on how we're going to create our models we use this methods more or less. For example if we create the whole model by code we need to create the expressions first and update them later. In case of the model has been created with our interactive CAD application called buerligons, we probably created the expressions already and only need to update them to configure.
To create expressions you can call:
After creating the expressions they will be found in the expression set. It's possible to use them directly in the code for further operations. You can access them by "ExpressionSet.[name of the expression]". Let's create a box by code and connect its members / properties with the created expressions to see how it works:
Often we create the model interactively and also set all expressions in buerligons. In that case we don't need to create, but can directly access them by code using the setExpressions() method. To change the expressions we've created above we can simply call: