1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
| Function GetUserInput() As Boolean
' Establish User Dialogue Box to Get Inputs
Begin Dialog UserDialog 1020,336,"Simulation Automater"
Picture 100,10,810,150,"H:\My Documents\filepath...\image.png",3,.Image
CancelButton 880,308,130,21
OKButton 740,308,130,21
GroupBox 10,260,320,70,"Export Results",.GroupBox1
GroupBox 10,170,320,80,"Eigenmode Simulation Position",.GroupBox2
GroupBox 340,170,670,120,"Optimisation Settings",.GroupBox3
Text 30,190,140,20,"Section Number (1-7)",.Text1
Text 360,190,100,30,"Parameter to Optimise",.Text4
...
TextBox 200,190,90,20,.section
TextBox 200,220,90,20,.position
...
End Dialog
Dim dlg As UserDialog
' Set Default Values in User Dialogue Fields
dlg.section = GetScriptSetting("section","1")
dlg.position = GetScriptSetting("position","0")
...
If (Not Dialog(dlg)) Then ' If the user left the dialog box without pressing OK
GetUserInput = False
Exit
Else ' If the user properly left the dialog box by pressing OK
GetUserInput = True
' Store the Optimisation Settings into the Database
StoreScriptSetting("section",dlg.section)
StoreScriptSetting("position",dlg.position)
...
End If
End Function |