INPUT: Difference between revisions
From Macros Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 10: | Line 10: | ||
|param5=<variable>|param5_desc=Variable to be set to the value of the contents of the input box. | |param5=<variable>|param5_desc=Variable to be set to the value of the contents of the input box. | ||
|param6=[<default>] |param6_desc={{default}} | |param6=[<default>] |param6_desc={{default}} | ||
|param7=[<format] |param7_desc= | |param7=[<format>] |param7_desc=format definition used to display default value when the default is a variable | ||
}} | }} | ||
Revision as of 16:06, 10 January 2019
Command
- Define the size and position of an input box.
Parameters
- <left>
- Start position measured from the left edge of the dialog.
- <top>
- Start position of measured from the top edge of the dialog.
- <width>
- Width of the control.
- <height>
- Height of the control.
- <variable>
- Variable to be set to the value of the contents of the input box.
- [<default>]
- Optional default value.
- [<format>]
- format definition used to display default value when the default is a variable
Example
- INPUT 65, 017, 70, 24, w1, 10
- INPUT 65, 017, 70, 24, w1, v1
- INPUT 65, 017, 70, 24, w1, v1, 43p
- Note: When the default is given as an explicit number (eg 1.25), then it will be displayed exactly as it is defined in this command.
- INPUT 65, 017, 70, 24, w1, 10 This will show the default value as 10
- INPUT 65, 017, 70, 24, w1, 10.0 This will show the default value as 10.0
- The optional format description is used to display the value when the default is defined using a variable
- The format is defined as 2 digis (number of digits before the decimal place, then number of digits after decimal place)
- followed by any or all of these optional chanracters
- p = decimal point
- l = leading zeros
- t = trailing zeros
- s = sign when positive
- For example, if the default is 12.34 and the format is
- 43p displayed as 12.34
- 43pt displayed as 12.340
- 43pl displayed as 0012.34
- 43plt displayed as 0012.340
- 43ps displayed as +12.34
- For an example macro see Create_Contour GeoPattern_Part.dlg GeoPattern_Repeats.dlg GetCommands.dlg GeoSavedProcess.dlg