VrOne/Python Programming
|
ON-LINE REFERENCE DOCUMENTATION CARDINAL SYSTEMS, LLC 386-439-2525
|
Vr Application Class More...
The Python Vr Application class
provides a way to write true event-driven python scripts that have the look and
feel of a standard VrOne application. When you create a Python VrApp class, a
new application is added to the application stack, just like any built-in
application such as Insert Line. The user can be presented with a menu keys
dialog box that looks like the ones used by standard VrOne applications. You
can also respond to user command entries such as "lay=10". Using an
event-driven design, your python scripts can become very interactive
applications. While applications created with Python are treated very similar
to built-in VrOne applications, you can't run more than one Python application
at a time. It is possible to mix standard VrOne apps on the stack along with
one Python application. See the testvrapp.py script to see an example of a
simple application that demonstrates the capabilities of the VrApp class.
Sets callback function for digitizer
events. Allows the Python script to respond when the cursor is moved or keys
are pressed.
|
Function |
Python function to handle
digitizer events. This is a function that you must create in your Python script.
The function should have the following format: 'def MyAppDigCB (x, y, z,
key):' |
Sets callback function for menu
key events. Allows the Python script to respond when the user presses a menu
key.
|
Function |
Python function to handle
digitizer events. This is a function that you must create in your Python
script. The function should have the following format: 'def MyAppKeyCB
(key):' |
Sets callback function for command
events. Allows the Python script to respond when the user keys in commands.
|
Function |
Python function to handle
command events. This is a function that you must create in your Python
script. The function should have the following format: 'def MyAppCmdCB
(cmdStrg):' |
Sets callback function for replot
events. Allows the Python script to respond when a graphics window is
replotted. This is useful if the script is displaying temporary information to
the user that needs to be refreshed when the graphics windows are replotted.
|
Function |
Python function to handle replot
events. This is a function that you must create in your Python script. The
function should have the following format: 'def MyAppReplotCB (WinNum):' |
Closes the current application.
This should always be called before calling the StopRunning method.
This must be called at the end of
Python script to keep the script running. A call to StopRunning must be made from
one of the callback functions to allow the script to exit.
Stops the current script from
running. The Close method should always be called before this one.