VrOne/Python Programming

ON-LINE REFERENCE DOCUMENTATION

CARDINAL SYSTEMS, LLC

386-439-2525    

www.cardinalsystems.net   
 

 

VrCfg Class Reference

VrOne/Python Configuration Class More...

Members


Detailed Description

The Configuration class allows various VrOne configuration parameters to be viewed and changed.

 

Example:

 

from pycfg import *

 

Cfg = VrCfg ()

 

(VrVersion) = Cfg.GetVrVersion ()

 

 


Member Function Documentation

Load (FileName)

Loads configuration from disk.

FileName

Configuration file name. (0=Use default)

returns

(ret)

 

ret

returns 0 = OK 1 = File did not exist and was created. -1 = Could not open file.

Rec ()

Records the current configuration.

returns

(ret)

 

ret

0=Success, 1=Failed

GetVrVersion ()

Returns the VrOne version string.

returns

(VrVersion)

 

VrVersion

VrOne version string

SetUseDefaultDir (UseDefaultDir)

Sets whether or not VrOne uses default directories.

UseDefaultDir

0=Don't use default directories, 1=Use default directories

UseDefaultDir ()

Returns status of default directory usage.

returns

(ret)

 

ret

0=Not using default directories, 1=Using default directories

SetDefaultDir (ProgNum, DefaultDir)

Sets the default directory for a program

ProgNum

Program number

DefaultDir

Default directory

GetDefaultDir (ProgNum, Override)

Returns the default directory for a program If UseDefaultDir is FALSE then NULL is returned

ProgNum

Program number (see vrcfg.h)

Override

TRUE - Always return default directory FALSE - If UseDefaultDir is FALSE then NULL is returned

returns

(ret)

 

ret

Default directory

GetSymFileName ()

Get the current symbol filename.

returns

(ret)

 

ret

Current symbol filename.

SetSymFileName (FileName)

Set the current symbol filename. The specified symbol file will be loaded.

FileName

Name of symbol file to load.

GetCharSetDir ()

Returns the directory that the character set files are in.

returns

(ret)

 

ret

Directory of character set files.

GetColorTableScreen ()

Returns the color table for screen filename.

returns

(ret)

 

ret

Color table for screen filename.

GetColorTablePlot ()

Returns the color table for plotting filename.

returns

(ret)

 

ret

Color table for plotting filename.

GetColorTableOverride ()

Returns the color table override filename.

returns

(ret)

 

ret

color table override filename.

GetLayerNameFile ()

Returns name of file containing layer names.

returns

(ret)

 

ret

Name of file containing layer names.

GetPenTable ()

Returns the pen table filename.

returns

(ret)

 

ret

Pen table filename.

SetPenTable (FileName)

Sets the pen table filename.

FileName

Pen table filename.

GetUsePenTable ()

Gets status of pen table usage.

returns

(ret)

 

ret

0=Pen table not being used, 1=Pen table being used.

GetBackgroundColor ()

Returns current background color.

returns

(ret)

 

ret

Background color (1-255)

GetSeaRad ()

Returns current search radius.

returns

(ret)

 

ret

Current search radius.

GetSeaDim ()

Returns current search dimension.

returns

(ret)

 

ret

Current search dimension.

GetSplineChord ()

Returns the spline chord length in in or mm.

 

GetBSplineIncr ()

Returns the B-Spline increment

 

GetStrokeDist ()

Returns the stroke distance for wide lines.

 

GetStrokeMode ()

Returns the stroke mode for wide line.

 

GetFillDist ()

Returns the fill distance for wide lines.

 

GetMinTextSize ()

Returns the minimum text size for plotting.

 

GetMinSymSize ()

Returns the minimum symbol size for plotting.

 

GetMbrOffset ()

Returns the default MBR offset

 

SetDspLines (DspLines)

Sets the display line status.

DspLines

0=Don't display lines, 1=Display lines

GetDspLines ()

Gets the display line status.

returns

(ret)

 

ret

0=Don't display lines, 1=Display lines

SetDspSplines (DspSplines)

Sets the display splined line status

DspSplines

0=Don't display splined lines, 1=Display splined lines

GetDspSplines ()

Gets the display splined line status

returns

(ret)

 

ret

0=Don't display splined lines, 1=Display splined lines

SetDspLfonts (DspLfonts)

Sets the display line fonts status

DspLfonts

0=Don't display line fonts, 1=Display line fonts

GetDspLfonts ()

Gets the display line fonts status

returns

(ret)

 

ret

0=Don't display line fonts, 1=Display line fonts

SetDspConstr (DspConstr)

Sets the display construction lines status

DspConstr

0=Don't display construction line, 1=Display construction lines

GetDspConstr ()

Gets the display construction lines status

returns

(ret)

 

ret

0=Don't display construction line, 1=Display construction lines

SetDspLinePoints (DspLinePoints)

Sets the display line points flag.

DspLinePoints

0=Don't display line points, 1=Display line points

GetDspLinePoints ()

Gets the display line points flag.

returns

(ret)

 

ret

0=Don't display line points, 1=Display line points

SetDspLineElevs (DspLineElevs)

Sets the display line elevations flag.

DspLineElevs

0=Don't display line elevations, 1=Display line elevations

GetDspLineElevs ()

Gets the display line points flag.

returns

(ret)

 

ret

0=Don't display line elevations, 1=Display line elevations

SetDspSymbols (DspSymbols)

Sets the display symbols flag.

DspSymbols

0=Don't display symbols, 1=Display symbols

GetDspSymbols ()

Gets the display symbols flag.

returns

(ret)

 

ret

0=Don't display symbols, 1=Display symbols

SetDspText (DspText)

Sets the display text flag.

DspText

0=Don't display text, 1=Display text

GetDspText ()

Gets the display text flag.

returns

(ret)

 

ret

0=Don't display text, 1=Display text

SetDspILines (DspILines)

Sets the display interactive lines flag.

DspILines

0=Don't display interactive lines, 1=Display interactive lines

GetDspILines ()

Gets the display interactive lines flag.

returns

(ret)

 

ret

0=Don't display interactive lines, 1=Display interactive lines

SetDspISymbols (DspISymbols)

Sets the display interactive symbols flag.

DspISymbols

0=Don't display interactive symbols, 1=Display interactive symbols

GetDspISymbols ()

Gets the display interactive symbols flag.

returns

(ret)

 

ret

0=Don't display interactive symbols, 1=Display interactive symbols

SetDspIText (DspIText)

Sets the display interactive text flag.

DspIText

0=Don't display interactive text, 1=Display interactive text

GetDspIText ()

Gets the display interactive text flag.

returns

(ret)

 

ret

0=Don't display interactive text, 1=Display interactive text

SetMbrOffset (Offset)

Sets the entity MBR offset used when searching.

Offset

MBR offset.

SetColorTableOverride (ColorTableName)

Sets the color table override filename.

ColorTableName

Color table override filename

SetSplineChord (SplineChord)

Sets the spline chord length

SplineChord

Spline chord length (in|mm) It is expected that the parameter is in the proper units (inches or millimeter).

SetBSplineIncr (BSplineIncr)

Sets the B spline increment. Sets the number of points that will be added between current points.

BSplineIncr

 

SetCursorType (CursorType)

Sets the cursor type

CursorType

0=Cross 1=Dot

GetCursorType ()

Returns the cursor type

returns

(ret)

 

ret

0=Cross 1=Dot

SetCursorSize (CursorSize)

Sets the cursor size

CursorSize

Cursor size in pixels

GetCursorSize ()

Returns the cursor size in pixels.

returns

(ret)

 

ret

Cursor size in pixels

SetCursorColor (CursorColor)

Sets the cursor color.

CursorColor

0=White 1=Black 2=Red 3=Green 4=Blue 5=Yellow

GetCursorColor ()

Gets the cursor color.

returns

(ret)

 

ret

0=White 1=Black 2=Red 3=Green 4=Blue 5=Yellow

SetCursorMaskSize (CursorSize)

Sets the cursor mask size.

CursorSize

Cursor mask size in pixels

GetCursorMaskSize ()

Gets the cursor mask size.

returns

(ret)

 

ret

Cursor mask size in pixels

SetCursorMaskShape (CursorShape)

Sets the cursor mask shape

CursorShape

0=Square,1=Circle

GetCursorMaskShape ()

Gets the cursor mask shape

returns

(ret)

 

ret

0=Square,1=Circle

SetCursorTrackPlane (TrackPlane)

Sets the cursor track plane for VrTwo.

TrackPlane

0=VIEW_PLANE 1=GROUND_PLANE

GetCursorTrackPlane ()

Gets the cursor track plane for VrTwo.

returns

(ret)

 

ret

0=VIEW_PLANE 1=GROUND_PLANE

GetImgPyraDir ()

Returns the image pyramid directory

 

GetImgPyraDrive ()

Returns the image pyramid drive

 

TogImgEdges ()

Toggles the display of image edges/names (Mono view only)

 

SetImgEdges (ImgEdges)

Sets the image edge display flag.

ImgEdges

0=Don't display image edges, 1=Display image edges

GetImgEdges ()

Gets the image edge display flag.

returns

(ret)

 

ret

0=Don't display image edges, 1=Display image edges

TogImgNames ()

Toggles the display of image edges/names (Mono view only)

 

SetImgNames (ImgNames)

Sets the image edge display flag.

ImgNames

0=Don't display image names, 1=Display image names

GetImgNames ()

Gets the image edge display flag.

returns

(ret)

 

ret

0=Don't display image names, 1=Display image names

SetImgDrawMode (DrawMode)

Set image draw mode.

DrawMode

1=Draw, 3=Xor, 4=Or

GetImgDrawMode ()

Get image draw mode.

returns

(ret)

 

ret

1=Draw, 3=Xor, 4=Or

GetWinShift ()

Get Window shift flag.

returns

(ret)

 

ret

0=Window shifting off, 1=Window shifting on

SetWinShift (WinShift)

Get Window shift flag.

WinShift

0=Window shifting off, 1=Window shifting on

SetBufXyXyzInput (BufMode)

Set input buffering flag.

BufMode

0=Off, 1=On

GetBufXyXyzInput ()

Fet input buffering flag.

returns

(ret)

 

ret

0=Off, 1=On

SetWinSync (WinSync)

Set window synchronization flag.

WinSync

0=Off, 1=On

GetWinSync ()

Get window synchronization flag.

returns

(ret)

 

ret

0=Off, 1=On

SetGridStus (GridStus)

Set grid display flag.

GridStus

0=Off, 1=On

GetGridStus ()

Get grid display flag.

returns

(ret)

 

ret

0=Off, 1=On

SetGridRes (GridRes)

Set grid resolution.

GridRes

 

GetGridRes ()

Get grid resolution.

 

SetGridType (GridType)

Set grid type.

GridType

0=Points, 1=Lines

GetGridType ()

Get grid type.

returns

(ret)

 

ret

0=Points, 1=Lines

SuspendGrid ()

Suspends grid display point snapping

 

ResumeGrid ()

Resumes grid display point snapping

 

SetCursConstStus (CursConstStus)

Set cursor constraint mode flag.

CursConstStus

0=Off, 1=On

GetCursConstStus ()

Get cursor constraint mode flag.

returns

(ret)

 

ret

0=Off, 1=On

TogCursConstStus ()

Toggle cursor constraint flag.

 

GetXyDigId ()

Gets the Xy Digitizer Id

 

SetXyDigId (XyDigId)

Sets the Xy Digitizer Id

XyDigId

 

GetXyDigDelay ()

Gets Xy Digitizer delay.

 

GetXyDigMode ()

Gets Xy Digitizer mode.

 

GetXyzDigId ()

Returns the Xyz Digitizer Id

 

SetXyzDigId (XyzDigId)

Sets the Xyz Digitizer Id

XyzDigId

 

GetXyzDigDelay ()

Gets the XYZ digitizer delay amount.

 

SetVrTwoWake (WakeMode)

Set VrTwo wake mode

WakeMode

0=Static, 1=Roaming

GetVrTwoWake ()

Get VrTwo wake mode

returns

(ret)

 

ret

0=Static, 1=Roaming

SetVrTwoEdgeDist (EdgeDist)

Sets VrTwo edge distance.

EdgeDist

 

GetVrTwoEdgeDist ()

Gets VrTwo edge distance.

 

SetHwId (HwId)

Set handwheel id

HwId

 

GetHwId ()

Get handwheel id

 

SetHwSfX (HwSfX)

Set handweel X scale factor.

HwSfX

 

GetHwSfX ()

Get handweel X scale factor.

 

SetHwSfY (HwSfY)

Set handweel Y scale factor.

HwSfY

 

GetHwSfY ()

Get handweel Y scale factor.

 

SetHwSfZ (HwSfZ)

Set handweel Z scale factor.

HwSfZ

 

GetHwSfZ ()

Get handweel Z scale factor.

 

SetHwLocZ (HwLocZ)

Set handweel Z location.

HwLocZ

0=Normal, 1=Z on right handwheel, 2=Z on left handwheel

GetHwLocZ ()

Get handweel Z location.

returns

(ret)

 

ret

0=Normal, 1=Z on right handwheel, 2=Z on left handwheel

SetMouseTwSf (Sf)

Sets the Mouse Thumbwheel Scale Factor.

Sf

Scale factor (1=none)

GetMouseTwSf ()

Returns the Mouse Thumbwheel Scale Factor.

 

SetMouseKeyX (RawKey, KeyX)

Sets a mouse key cross reference

RawKey

Raw key value (1-16)

KeyX

Key cross reference value

GetMouseKeyX (RawKey)

Returns the cross reference value for a mouse key

RawKey

Mouse raw device (1-16)

returns

(ret)

 

ret

Cross referenced key value

SetZSource (ZSource)

Set Z source.

ZSource

0=Instrument or Active Z, 1=Dtm Z if active, 2=Force Z

GetZSource ()

Get Z source.

returns

(ret)

 

ret

0=Instrument or Active Z, 1=Dtm Z if active, 2=Force Z

SetActiveZ (ActiveZ)

Set active Z.

ActiveZ

 

GetActiveZ ()

Get active Z.

 

IncActiveZ (DeltaZ)

Increment active Z

DeltaZ

Increment amount.

GetForceZ ()

Get force Z flag.

returns

(ret)

 

ret

0=On, 1=Off

SetForceZ (ForceZ)

Set force Z flag.

ForceZ

0=On, 1=Off

GetContInt ()

Get contour interval

 

SetContInt (ContInt)

Set contour interval

ContInt

 

GetSnapZToActiveZ ()

Get snap z to active z flag.

returns

(ret)

 

ret

0=On, 1=Off

SetSnapZToActiveZ (SnapZToActiveZ)

Set snap z to active z flag.

SnapZToActiveZ

0=On, 1=Off

SetPlotFormat (PlotFormat)

Sets the plot format.

PlotFormat

0=HPGL 1=HPGL2 2=HPGL2/RTL 3=POSTSCRIPT

GetPlotFormat ()

Sets the plot format.

returns

(ret)

 

ret

0=HPGL 1=HPGL2 2=HPGL2/RTL 3=POSTSCRIPT

GetPlotIface ()

Get plot interfance.

returns

(ret)

 

ret

0=TO_FILE 1=TO_RS232

GetPlotBrightContrast ()

Returns the plotter brightness and contrast adjustments.

returns

(Bright, Contrast)

 

Bright

Brightness adjustment 0-100 (50=none)

 

Contrast

Contrast adjustment 0-100 (50=none)

SetPlotBrightContrast (Bright, Contrast)

Sets the plotter brightness and contrast adjustments.

Bright

Brightness adjustment 0-100 (50=none)

Contrast

Contrast adjustment 0-100 (50=none)

GetVrPathDir (DirNum)

Returns a Vr path directory name

DirNum

Directory number (0-9)

returns

(DirName)

 

DirName

Return directory name (128 char)

SetVrPathDir (DirNum, DirName)

Sets a Vr path directory name

DirNum

Directory number (0-9)

DirName

Return directory name (128 char)

GetActiveDig ()

Returns digitizer used when starting VrOne.

returns

(ret)

 

ret

0 = XY, 1 - XYZ, 2 - Mouse

GetOpenLastVr ()

Returns Open last VR files flag

returns

(ret)

 

ret

0=No 1=Yes

GetOpenLastImg ()

Returns Open last VR files flag

returns

(ret)

 

ret

0=No 1=Yes

GetPromptUnits ()

Returns prompt units

returns

(ret)

 

ret

0=Inches 1=Millimeters

GetMaxApps ()

Returns the maximum number of VrOne applications

 

SetMwDecAccur (DecAccur)

Set main window decimal accuracy.

DecAccur

Decimal accuracy for coords in main window.

GetMwDecAccur ()

Get main window decimal accuracy.

 

GetMmPerInch ()

Returns the number of millimeters per inch

returns

(ret)

 

ret

Number of mm per inch i.e. 25.4

GetMetersToFeet ()

Returns the meters to feet conversion factor.

 

GetBrowser ()

Returns the browser program file name.

 

GetFkeyFileName ()

Returns the function key file name.

 

GetMbCmdFileName ()

Returns the Xyz digitizer menu board command file name.

 

GetKpCmdFileName ()

Returns the keypad menu board command file name.

 

GetMacroFileName ()

Get current macro filename.

 

SetBeepStus (BeepStus)

Set beep flag.

BeepStus

0=On, 1=Off

GetBeepStus ()

Get beep flag.

returns

(ret)

 

ret

0=On, 1=Off

GetBeep (ButtonNum)

Returns the button status for a single button.

ButtonNum

Button number 0-11 (10=* 11=#)

SetBeep (ButtonNum, BeepStatus)

Sets the button status for a single button.

ButtonNum

Button number 0-11 (10=* 11=#)

BeepStatus

0=Off 1=On

SetBeep2 (BeepStatus)

Sets the button status for all buttons.

BeepStatus

0=Off 1=On

GetBeepSound (ButtonNum)

Gets the sound file name for a beep

ButtonNum

ButtonNum 0-11 (10=* 11=#)

returns

(BeepSound)

 

BeepSound

Sound file name (128 char, Normally .wav)

SetBeepSound (ButtonNum, BeepSound)

Sets the sound file name for a beep

ButtonNum

ButtonNum 0-11 (10=* 11=#)

BeepSound

Sound file name (128 char, Normally .wav)

SetBeepNormal (BeepSound)

Sets the normal beep sound

BeepSound

Sound file name (128 char, Normally .wav)

GetBeepNormal ()

Returns the normal beep sound

returns

(ret)

 

ret

Sound file name (128 char, Normally .wav)

SetBeepAlert (BeepSound)

Sets the normal beep sound

BeepSound

Sound file name (128 char, Normally .wav)

GetBeepAlert ()

Returns the normal beep sound

returns

(ret)

 

ret

Sound file name (128 char, Normally .wav)

SetBeepPlotStart (BeepSound)

Sets the sound of the beep when replot is started

BeepSound

Sound file name (128 char, Normally .wav)

GetBeepPlotStart ()

Returns the sound of the beep when replot is started

returns

(ret)

 

ret

Sound file name (128 char, Normally .wav)

SetBeepPlotDone (BeepSound)

Sets the sound of the beep when replot is done

BeepSound

Sound file name (128 char, Normally .wav)

GetBeepPlotDone ()

Returns the sound of the beep when replot is done

returns

(ret)

 

ret

Sound file name (128 char, Normally .wav)

SetNumLockControl (State)

Set num lock control flag.

State

0=On, 1=Off

GetNumLockControl ()

Get num lock control flag.

returns

(ret)

 

ret

0=On, 1=Off