TBApiSetCalibrationStyle API Call

 

Description

Sets, or adds, a calibration style for a device.

Parameters

Device handle, handle to calibration style and Calibration Style structure containing new/amended settings.

Returns

0 = fail, 1 = OK.

Notes

To add a new style, pass TBNEW_STYLE as style name.

The calibration reference points are re-calculated by this function.

It is necessary to invoke TBApiApply for the changes to take effect.

See also

Other calibration related API calls.

 

Visual C++ Declaration/example

 

BOOL  TBAPI TBApiSetCalibrationStyle(HTBDEVICE aDeviceHandle, HTBSTYLE aHStyle, _CalStyle* aStyle);

 

// aStyleName specifies the name aStyle should be a normally be empty string,

// A style can be added or changed by specifying the style format aStyle

//

// eg 1, selecting the existing calibration style "Projected"

TBApiSetCalibrationStyle(device,_T("Projected"),_T(""));

//

// eg 2, creating a new calibration style "New Style"

// This creates a style with 2 points, 12 % in, 10 second timeout, not transparent, and no rotation

TBApiSetCalibrationStyle(device,_T("TBNEW_STYLE"),_T("New Style,2,12,10,0,0"));

 

Visual Basic Declaration/example

 

Public Declare Function TBApiSetCalibrationStyle Lib "TBapi" Alias "_DLL_TBApiSetCalibrationStyle@12" (ByVal aDeviceHandle As Byte, ByVal aHStyle As Byte, ByVal aStyle As Long) As Long

 

‘ aStyleName specifies the name aStyle should be a normally be empty string,

‘ A style can be added or changed by specifying the style format aStyle

‘ eg 1, selecting the existing calibration style "Projected"

TBApiSetCalibrationStyle device, "Projected",""

‘ eg 2, creating a new calibration style "New Style"

‘ This creates a style with 2 points, 12 % in, 10 second timeout, not transparent, and no rotation

TBApiSetCalibrationStyle(device, "TBNEW_STYLE","New Style,2,12,10,0,0"