... | ... | @@ -53,7 +53,7 @@ x = DefineNumber[1, Name "My variable", Choices {0,3,5}]; |
|
|
x = DefineNumber[1, Name "My variable", Choices {0="Zero",3="Three", 5="Five"}];
|
|
|
x = DefineNumber[1, Name "My variable", Min 0, Max 50, Step 5}]
|
|
|
x = DefineNumber[1, Name "Variables/Input/My variable", Min 0, Max 50, Step 5];
|
|
|
y = DefineNumber[2. * x, Name "My read-only variable y = 2*x", ReadOnly];
|
|
|
y = DefineNumber[2. * x, Name "My read-only variable y = 2*x", ReadOnly 1];
|
|
|
s = DefineString["a", Name "My string variable"];
|
|
|
s = DefineString["a", Name "My string variable", Choices {"a", "b", "c"}];
|
|
|
s = DefineString["a", Name "My string variable", Kind "File"]
|
... | ... | @@ -103,7 +103,7 @@ Note that in addition to setting the values of the local variables in the input |
|
|
```cpp
|
|
|
DefineConstant[ x = {1, Name "My variable"} ];
|
|
|
DefineConstant[ x = {1, Name "My variable", Choices {0,3,5}} ,
|
|
|
y = {2. * x, Name "My read-only variable y = 2*x", ReadOnly},
|
|
|
y = {2. * x, Name "My read-only variable y = 2*x", ReadOnly 1},
|
|
|
s = {"a", Name "My string variable"} ];
|
|
|
```
|
|
|
|
... | ... | @@ -145,7 +145,7 @@ Here's the list of attributes available for all ONELAB parameters: |
|
|
|
|
|
* `Name "string"`: The name of the parameter in the ONELAB database, in the form of a `/`-separated path. The `Name` attribute is mandatory to exchange the variable with the ONELAB server. If no name (and no other attribute) is given, the `DefineConstant` construct can be used to assign default values to local variables (which will not be sent to the ONELAB server).
|
|
|
|
|
|
* `ReadOnly 0|1`: If ReadOnly is set, the value cannot be changed server-side, and the value provided in `DefineConstant` is always used.
|
|
|
* `ReadOnly 0|1`: If ReadOnly is set, the value cannot be changed server-side (e.g. interactively in the graphical user interface), and the value provided in `DefineNumber`, `DefineConstant`, etc., is always used.
|
|
|
|
|
|
* `Highlight "string"`: Color used to draw the widget in the graphical interface.
|
|
|
|
... | ... | @@ -157,7 +157,7 @@ Here's the list of attributes available for all ONELAB parameters: |
|
|
|
|
|
* `AutoCheck 0|1`: Allows to disable automatic "check" (rebuild of the interface) when the value is changed.
|
|
|
|
|
|
* `GmshOption "string"`: Treat the parameter as the name of a Gmsh option (e.g. `Mesh.Algorithm`). Can also be used to force a database reset (with `ResetDatabase`), or a full model reset (with `Reset`).
|
|
|
* `GmshOption "string"`: Treats the parameter as the name of a Gmsh option (e.g. `Mesh.Algorithm`). Can also be used to force a database reset (with `ResetDatabase`), or a full model reset (with `Reset`).
|
|
|
|
|
|
* `Label "string"`: Alternative label used in the graphical user interface, replacing the part of `Name` located after the last `/`.
|
|
|
|
... | ... | |