GET_USER_INPUT
Requests input from the user during the script run.
Description
With the GET_USER_INPUT command various types of input data can be requested from the user during the script run. Each individual input request is a new line directly after the GET_USER_INPUT line, except for the OPTION input type, which can take up several lines. One GET_USER_INPUT command will generate one dialogue window, with all the input fields listed. An arbitrary number of inputs can be requested within one GET_USER_INPUT command, but it is advised to take into account the available screen space for the dialogue window that will be generated.
After the user defined all the requested inputs and clicked on the "OK" button, the given values will be saved into their respective variables, and the script run will continue.
Additionally to input inquiries, images can be inserted into the dialogue window. This is typically useful in case there is some explanation needed for the input request in the form of a drawing or a picture.
Syntax
GET_USER_INPUT
TEXT [Variable name] [Dialogue text] [Default value]
NUMBER [Variable name] [Dialogue text] [Default value]
BOOL [Variable name] [Dialogue text] [Default value]
OPTION [Variable name] [Dialogue text] [Default value]
[Option 0 value] [Option 0 dropdown text]
[Option 1 value] [Option 1 dropdown text]
[Option 2 value] [Option 2 dropdown text]
ENDOPTION
POINT [Array name] [Dialogue text]
OBJECT [Array name] [Dialogue text] [Object type]
FILE_PATH [Variable name] [Dialogue text] [Default value]
Input types
One or more input types can be requested within one GET_USER_INPUT command in arbitrary order.
Available input types:
| Input type | Description |
|---|---|
| Text | Text input |
| Number | Numerical input |
| Bool | Boolean input |
| Option | Option choice from dropdown |
| Point | x,y,z coordinates of a point selected in the model |
| Object | Object IDs of model objects selected in the model |
| File path | File path input with file open button |
Sample code
GET_USER_INPUT
TEXT TextVariable "Text input" textdefault
NUMBER NumberVariable "Numerical input" 12345
BOOL BoolVariable "Bool input" True
OPTION OptionVariable "Dropdown option" 1
Opt_Value0 "Option 0"
Opt_Value1 "Option 1"
Opt_Value2 "Option 2"
ENDOPTION
POINT PointArray "Point select"
OBJECT ObjectArray "Object select"
FILE_PATH file_path "File path"
The above code will result in this input dialogue:
Detailed description of input types
Text input
Syntax
GET_USER_INPUT
TEXT [Variable name] [Dialogue text] [Default value]
Command parameters
| Command parameter | Assignment | Value format | Input options |
|---|---|---|---|
| Variable name | Required | String | Local, variable |
| Dialogue text | Required | String | Local, variable |
| Default value | Optional | String | Local, variable |
