Vr Mapping

ON-LINE REFERENCE DOCUMENTATION

CARDINAL SYSTEMS, LLC

www.cardinalsystems.net

Application Class Reference (PyVrApp)

Vr Application Class More...

Members

SetDigCB (Function)
SetKeyCB (Function)
SetCmdCB (Function)
SetReplotCB (Function)
Close ()
KeepRunning ()
StopRunning ()

 


Description

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 event-driven designs, Python scripts can become very interactive applications. While applications created with Python are treated similarly to built-in VrOne applications, only one Python application can be run at a time. Standard VrOne apps and one Python application can be mixed on the stack. See the testvrapp.py script to see an example of a simple application that demonstrates the capabilities of the VrApp class.

 


Member Function Documentation

SetDigCB (Function)

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):'

 

SetKeyCB (Function)

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):'

 

SetCmdCB (Function)

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):'

 

SetReplotCB (Function)

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 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):'

 

Close ()

Closes the current application. This should always be called before calling the StopRunning method.

 

KeepRunning ()

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.

 

StopRunning ()

Stops the current script from running. The Close method should always be called before StopRunning.