VrOne/Python Programming
|
ON-LINE REFERENCE DOCUMENTATION CARDINAL SYSTEMS, LLC 386-439-2525
|
VrOne/Python graphical user interface and
miscellaneous system routines. More...
The Python VrOne GUI Class
contains graphical user interface routines.
Places text into the message area
of the main window. This is the bottom longest line.
|
LabelStrg |
Text to place in message area. |
Places text into message area 0 of
the main window. This is the top longest line. This area is normally filled by
fields but may be written as a single line with this routine.
|
LabelStrg |
Text to place in message area. |
Places text a field of the state
message area.
|
FieldNum |
Field number (0-5) |
|
Strg |
Text to place in field (up to 39
char) |
Places text into the main window
label area.
|
Num |
Label area (0-1) |
|
LabelStrg |
Text to place in label area. |
Sets the title sent in the main
window's window title bar.
|
TitleStrg |
Title to set. |
Shows coordinate in main window.
|
x |
X Coordinate to show. |
|
y |
Y Coordinate to show. |
|
z |
Z Coordinate to show. |
Shows elevation in main window.
|
z |
Elevation to show. |
Clears the coordinate display area
Displays an open file dialog and
returns the name of the file selected by the user.
|
Title |
Title for dialog box. |
|
|
DefaultDir |
Initial path to display or leave
blank to display the current working path |
|
|
Ext |
Allows you to limit the types of
files displayed (Example: “*.txt” would only show files that have a .txt
extension) |
|
|
FileName |
Return file name. |
|
|
returns |
(filename) |
|
|
|
filename |
File name selected by user |
|
Example |
(FileName) = OpenFileDialog (“Text File Input”, “”, “*.txt”) if
(FileName): InFile = open
(FileName, "r") # Read data from file InFile.close() |
Displays a save file dialog and
returns the name of the file selected or entered by the user.
|
Title |
Title for dialog box. |
|
|
DefaultDir |
Initial path to display or leave
blank to display the current working path |
|
|
Ext |
Allows you to limit the types of
files displayed (Example: “*.txt” would only show files that have a .txt
extension) |
|
|
returns |
(filename) |
|
|
|
filename |
File name selected or entered by
user |
|
Example |
(FileName)
= SaveFileNameDialog (“Enter file name”, “”, “*.txt”) if
(FileName): OutFile = open
(FileName, "w") # Write data to file OutFile.close() |
Displays a directory selection
dialog and returns the name of the directory selected.
|
Title |
Title for dialog box. |
|
|
DefaultDir |
Initial path to display or leave
blank to display the current working path |
|
|
ParamName |
Optional parameter filename so
last location can be remembered |
|
|
returns |
(ret, filename) |
|
|
|
ret |
0=Ok pressed, 1=Cancel pressed |
|
|
filename |
Name of directory |
Displays a message in a modal
dialog box with an OK button
|
MessageStrg |
Message to display |
|
Title |
Title for window border |
Displays a message in a modal
dialog box with an OK and Cancel button
|
MessageStrg |
Message to display |
|
|
Title |
|
|
|
returns |
(ret) |
|
|
|
ret |
O = OK pressed, -1 = Cancel
pressed |
Displays a message in a modal
dialog box with an OK and Cancel button
|
MessageStrg |
Message to display |
|
|
Title |
Title for window border |
|
|
returns |
(ret) |
|
|
|
ret |
0 - Ok pressed, -1 - Cancel
pressed |
Displays a message in a modal
dialog box with an Yes and No buttons
|
MessageStrg |
Message to display |
|
|
Title |
Title for window border |
|
|
returns |
(ret) |
|
|
|
ret |
1 - Yes pressed, 0 - No pressed |
Displays a message in a modal
dialog box with Yes, No, and Cancel buttons
|
MessageStrg |
Message to display |
|
|
Title |
Title for window border |
|
|
returns |
(ret) |
|
|
|
ret |
1 - Yes pressed, 0 - No pressed,
-1 - Cancel pressed |
Displays a message in a modal
dialog box with an Try Again button
|
MessageStrg |
Message to display |
|
Title |
Title for window border |
Displays a message in a modal
dialog box with up to 3 buttons
|
MessageStrg |
Message to display |
|
|
But0 |
Button title 0 (NULL =
disabled). |
|
|
But1 |
Button title 1 (NULL =
disabled). |
|
|
But2 |
Button title 2 (NULL =
disabled). |
|
|
Title |
Title for window border |
|
|
returns |
(ret) |
|
|
|
ret |
Button number pressed (0-2 |
-1=Escape or Close box pressed) |
Displays a dialog that allows the
user to enter a text string.
|
Prompt |
Prompt to display |
|
|
Title |
Title for window border |
|
|
returns |
(ret) |
|
|
|
ret |
String entered by user or blank
if user didn't enter a string |
|
Example |
(InputStrg)
= InputDialog (“Input Test”, “Please enter a string”) |
Pushes a string into the VrOne
Main Window key-in field and presses return. =Emulates a user typing a command
or argument and pressing return. All VrOne key-ins are available to this
function
|
Strg |
String to push |
|
Example |
PushKeyin
(“SnaOn, SnaInt, InsLin”) |
Allows the user to select a
location on the VrOne graphics window and returns the coordinate selected.
|
Title |
Title to display in VrOne
message area |
|
|
returns |
(status, x, y, z) |
|
|
|
status |
0=User selected point, 1=User
cancelled selection |
|
|
x, y, z |
Coordinate selected by user
(double precision) |
|
Example |
(stat, x, y, z) = GetCoord (“Select Coordinate”) if
(stat == 0): print ("Selected
coordinate %.2f,%.2f,%.2f" % (x,y,z)) |
Makes computer beep if beeping is
turned on.
|
SoundFile |
Sound file to play. Normally a
.wav file |
|
UseDefault |
If a null string is sent for the
sound file, play the default sound (default=TRUE) |
Inits the progress bar.
|
Desc |
Text description of task |
|
TotalSteps |
Total steps. May be any integer
number |
Updates the progress bar
|
Progress |
Progress count |
|
|
returns |
(ret) |
|
|
|
ret |
Current progress percent, or -1
if progress was not updated |
Resets progress bar