IMVAutoCalcSetup

The IMVAutoCalcSetup interface contains methods and properties to configure the the auto calculation function from the MV Gauge filter. The results of the auto calculatons are send throught the I/O output pin from the filter.

Methods:

AutoCalcCount Count of possible auto calculations.
CalcLinesColor Colour for drawing results.
DrawCalcLines Draw auto calculation results.
EnableAutoCalc Enable an auto calculation.
GetAutoCalcParameter Get the parameter of a auto calulation.
GetAutoCalcResult Get auto calculation results.
IsAutoCalc Check if an auto calculation is enabled.
SetAutoCalcParameter Set the parameter of a auto calulation.

Header file: IMVGauge.h
Interface definition language file: IMVGauge.idl
Typelib: MVGauge
Interface ID: IID_IMVAutoCalcSetup

Algoritm Table

Algorithm

Value

Count of Points

Description
MV_GAUGE_3POINT_CIRCLE

0

3

Calculates the radius of an circle.
MV_GAUGE_ANGLE

1

4

Calculates the angle of two lines.
MV_GAUGE_POINT_DISTANCE

2

2

Calculates the distance between two points.
MV_GAUGE_LINE_DISTANCE

3

4

Calculates the distance between two lines.

Property IMVAutoCalcSetup::AutoCalcCount

Declaration: Property Get AutoCalcCount As Long

Count of possible auto calculations.

C Prototype:

HRESULT put_AutoCalcCount(LONG newVal);
HRESULT get_AutoCalcCount(LONG *pVal);


Property IMVAutoCalcSetup::CalcLinesColor

Declaration: Property Get/Put CalcLinesColor As Long

Colour for drawing results.

C Prototype:

HRESULT put_CalcLinesColor(LONG newVal);
HRESULT get_CalcLinesColor(LONG *pVal);


Property IMVAutoCalcSetup::DrawCalcLines

Declaration: Property Get/Put DrawCalcLines As Boolean

Draw auto calculation results.

C Prototype:

HRESULT put_DrawCalcLines(VARIANT_BOOL newVal);
HRESULT get_DrawCalcLines(VARIANT_BOOL *pVal);


Method IMVAutoCalcSetup::EnableAutoCalc

Declaration: Sub EnableAutoCalc(Index As Long, Enable As Boolean)

Enable an auto calculation.

Parameter:

Index Index of the auto calculation (is equalant to the I/O output pin)
Enable Enable the auto calculation.
C Prototype:

HRESULT EnableAutoCalc(LONG Index, VARIANT_BOOL Enable);


Method IMVAutoCalcSetup::GetAutoCalcParameter

Declaration: Sub GetAutoCalcParameter(Index As Long, Enabled As Boolean, Algorithm As Long, Point1 As Long, Point2 As Long, Point3 As Long, Point4 As Long, Point5 As Long, Point6 As Long, Point7 As Long, Point8 As Long)

Get the parameter of a auto calulation. Not every algorithm needs all points. The index value -1 stands for undefined.

Parameter:

Index Index of the auto calculation (is equalant to the I/O output pin)
Enabled State of the auto calculation.
Algorithm Algorithm number.
Point1 Index of the first point for the calculation.
Point2 Index of the second point for the calculation.
Point3 Index of the third point for the calculation.
Point4 Index of the fourth point for the calculation.
Point5 Index of the fifth point for the calculation.
Point6 Index of the sixth point for the calculation.
Point7 Index of the seventh point for the calculation.
Point8 Index of the eighth point for the calculation.
C Prototype:

HRESULT GetAutoCalcParameter(LONG Index, VARIANT_BOOL* Enabled, LONG* Algorithm, LONG* Point1, LONG* Point2, LONG* Point3, LONG* Point4, LONG* Point5, LONG* Point6, LONG* Point7, LONG* Point8);


Method IMVAutoCalcSetup::GetAutoCalcResult

Declaration: Function GetAutoCalcResult(Index As Long) As Double

Get auto calculation results.

Parameter:

Index Index of the auto calculation (is equalant to the I/O output pin)
C Prototype:

HRESULT GetAutoCalcResult(LONG Index, DOUBLE* value);


Method IMVAutoCalcSetup::IsAutoCalc

Declaration: Function IsAutoCalc(Index As Long) As Boolean

Check if an auto calculation is enabled.

Parameter:

Index Index of the auto calculation (is equalant to the I/O output pin)
C Prototype:

HRESULT IsAutoCalc(LONG Index, VARIANT_BOOL* value);


Method IMVAutoCalcSetup::SetAutoCalcParameter

Declaration: Sub SetAutoCalcParameter(Index As Long, Enabled As Boolean, Algorithm As Long, Point1 As Long, Point2 As Long, Point3 As Long, Point4 As Long, Point5 As Long, Point6 As Long, Point7 As Long, Point8 As Long)

Set the parameter of a auto calulation. Not every algorithm needs all points. The index value -1 stands for undefined.

Parameter:

Index Index of the auto calculation (is equalant to the I/O output pin)
Enabled State of the auto calculation.
Algorithm Algorithm number.
Point1 Index of the first point for the calculation.
Point2 Index of the second point for the calculation.
Point3 Index of the third point for the calculation.
Point4 Index of the fourth point for the calculation.
Point5 Index of the fivth point for the calculation.
Point6 Index of the sixth point for the calculation.
Point7 Index of the seventh point for the calculation.
Point8 Index of the eighth point for the calculation.
C Prototype:

HRESULT SetAutoCalcParameter(LONG Index, VARIANT_BOOL Enabled, LONG Algorithm, LONG Point1, LONG Point2, LONG Point3, LONG Point4, LONG Point5, LONG Point6, LONG Point7, LONG Point8);