PC-DMIS 2021.2 Object Library
TempComp Object
See Also  Members  Send Topic Feedback | See Object Hierarchy Chart
PCDLRN ActiveX DLL : TempComp Object

Glossary Item Box

Description

The TempComp object gives access to the properties of the PC-DMIS Temperature Compensation command. For additional information about Temperature Compensation, see "Compensating for Temperature" in the "Setting Your Preferences" section of the PC-DMIS Help File.

Remarks

In PC-DMIS, you can use four different WPF dialog boxes to control Temperature Compensation. The IDs you can access on each through automation are provided below:

 

Compensation Setup dialog box - Edit | Preferences | Temperature Compensation Setup

const int IDC_TEMP_COMP_CELSIUS = 2122;
const int IDC_TEMP_COMP_ON = 1774;
const int IDC_TEMP_SENS_NUM_X = 2091;
const int IDC_TEMP_COEFF_X = 2092;
const int IDC_TEMP_SENS_NUM_Y = 2093;
const int IDC_TEMP_COEFF_Y = 681;
const int IDC_TEMP_SENS_NUM_Z = 2094;
const int IDC_TEMP_COEFF_Z = 682;
const int IDC_TEMP_SENS_NUM_P = 2095;
const int IDC_TEMP_COEFF_P = 683;

 

Thermal Expansion Origin dialog box - Insert | Parameter Change | Thermal Expansion Origin

const int IDC_TEMP_ORIGIN_X = 2100;
const int IDC_TEMP_ORIGIN_Y = 696;
const int IDC_TEMP_ORIGIN_Z = 697;

 

Temperature Compensation Command dialog box - Insert | Parameter Change | Temperature Compensation

const int IDC_TEMP_COMP_CELSIUS = 2122;
const int IDC_TEMP_AUTOMATIC = 2101;
const int IDC_TEMP_COEFF_X = 2092;
const int IDC_TEMP_HI_X = 2098;
const int IDC_TEMP_LO_X = 2099;
const int IDC_TEMP_COEFF_Y = 681;
const int IDC_TEMP_HI_Y = 690;
const int IDC_TEMP_LO_Y = 693;
const int IDC_TEMP_COEFF_Z = 682;
const int IDC_TEMP_HI_Z = 691;
const int IDC_TEMP_LO_Z = 694;
const int IDC_TEMP_COEFF_P = 683;
const int IDC_TEMP_HI_P = 692;
const int IDC_TEMP_LO_P = 695;
const int IDC_TEMP_COEFF_LIST = 14395;

 

Temperature Compensation Command dialog box (Execution) - Ensure that the TEMPCOMP command is set to the Manual method, then execute the routine.

const int IDC_TEMP_COMP_CELSIUS = 2122;
const int IDC_TEMP_COMP_ON = 1774;
const int IDC_TEMP_CURTEMP_X = 2096;
const int IDC_TEMP_HI_X = 2098;
const int IDC_TEMP_LO_X = 2099;
const int IDC_TEMP_CURTEMP_Y = 684;
const int IDC_TEMP_HI_Y = 690;
const int IDC_TEMP_LO_Y = 693;
const int IDC_TEMP_CURTEMP_Z = 685;
const int IDC_TEMP_HI_Z = 691;
const int IDC_TEMP_LO_Z = 694;
const int IDC_TEMP_CURTEMP_P = 686;
const int IDC_TEMP_HI_P = 692;
const int IDC_TEMP_LO_P = 695;

With these WPF dialog boxes, it is not possible to access the control that visualizes the value. However, you can access the property that is bound to it. The supported property types are: boolean, integer, unsigned, and double. Because you can get only string, integer, and double values and you can only set integer and string values, the get / set values are converted according to the following rules:

Boolean property:
a) Get boolean property value as integer value: The returned value is -1 for true or 0 for false.
b) Get boolean property value as unsigned integer value: The returned value is (unsigned) -1 for true or 0 for false.
c) Get boolean property value as double value: The returned value is -1 for true or 0 for false.
d) Get boolean property value as string value: The returned value "true" or "false".
e) Set boolean property value from integer value: The value != 0 is used to sets the property.
f) Set boolean property value from unsigned integer value: The value != 0 is used to sets the property.
g) Set boolean property value from double value: The value != 0 is used to sets the property.
h) Set boolean property value from string value: First, it checks for the "true or "false" words. If found, the bool value is set accordingly; otherwise, it tries to convert the string value in a double value. If a double value is found, the value != 0 is used to set the property.

Integer property:
a) Get integer property value as boolean value: The returned value is <property value != 0>.
b) Get integer property value as unsigned integer value: The returned value is the property value cast to an unsigned integer.
c) Get integer property value as double value: The returned value is the property value cast to a double.
d) Get integer property value as string value: The returned value is the string representation of the integer value.
e) Set integer property value from boolean value: The -1 (for true) and 0 (for false) values are used to set the property.
f) Set integer property value from unsigned integer value: The unsigned value is casted to an int and used to set the property.
g) Set integer property value from double value: The double value is casted to an int and used to sets the property.
h) Set integer property value from string value: First, it tries to convert the string value in an int value to set the property. If the conversion fails, it tries to convert the string value into a double value, round it to an integer and set the property.

Unsigned integer property:
a) Get unsigned integer property value as boolean value: The returned value is <property value != 0>.
b) Get unsigned integer property value as integer value: The returned value is the property value cast to an integer.
c) Get unsigned integer property value as double value: The returned value is the property value cast to a double.
d) Get unsigned integer property value as string value: The returned value is the string representation of the unsigned integer value.
e) Set unsigned integer property value from boolean value: The casted (unsigned) -1 (for true) and 0 (for false) values are used to set the property.
f) Set unsigned integer property value from integer value: The integer value is cast to unsigned integer and is used to set the property.
g) Set unsigned integer property value from double value: The double value is casted to unsigned integer and is used to set the property.
h) Set unsigned integer property value from string value: First, it tries to convert the string value to an unsigned integer value to set the property.
If the conversion fails, it tries to convert the string value to an integer value and set the property.
If the conversion fails, it tries to convert the string value to a double value, round it to an integer, and set the property.

Double property:
a) Get double property value as boolean value: The returned value is <property value != 0.0>.
b) Get double property value as integer value: The returned value is the property value cast to an integer.
c) Get double property value as unsigned integer value: The returned value is the property value cast to an unsigned integer.
d) Get double property value as string value: The returned value is the string representation of the double value.
e) Set double property value from boolean value: The -1.0 (for true) and 0.0 (for false) values are used to set the property.
f) Set double property value from integer value: The integer value is cast to a double and is used to set the property.
g) Set double property value from double value: The unsigned integer value is cast to a double double and is used to set the property.
h) Set double property value from string value: This tries to convert the string value to a double value and set the property.

String property:
a) Get string property value as boolean value: First, it checks the string property value for the "true or "false" words.
If found, the boolean value is returned; otherwise, it tries to convert the string property value to a double value. The <double value != 0.0> boolean value is returned.
b) Get string property value as integer value: First, it tries to convert the string property value to an integer and return that value. If the conversion fails, it tries to convert the string property value to a double value, and return the rounded value.
c) Get string property value as unsigned integer value: First, it tries to convert the string property value into an unsigned integer value to return.
If the conversion fails, it tries to convert the string property value to a double value, and return the rounded value cast to an unsigned integer.
d) Get string property value as double value: First, it tries to convert the string property value to a double value. If the conversion fails, it returns 0.0.
e) Set string property value from boolean value: The string representation of a boolean value is used to set the property.
f) Set string property value from integer value: The string representation of an integer value is used to set the property.
g) Set string property value from unsigned integer value: The string representation of an unsigned integer value is used to set the property.
h) Set string property value from double value: The string representation of double value is used to set the property.

 

See Also

Copyright © 2021. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.