Filters
Filter values by
Type of result
  • Metrology feature results
  • Metrology tolerance results
  • Miscellaneous result
Feature geometry
  • Arc feature
  • Circle feature
  • Edgel feature
  • Point feature
  • Line feature
  • Segment feature
  • Frame feature
| Customize Help
| Save Settings

MmetGetResult



Function Map
Synopsis
Get the specified type of results from a MIL metrology result buffer.
Syntax
void MmetGetResult(
MIL_ID ResultId, //in
MIL_INT LabelOrIndex, //in
MIL_INT64 ResultType, //in
void *ResultArrayPtr //out
)
Description

This function retrieves all results of the specified type from a metrology result buffer, after an MmetCalculate() call. The result entries are ordered by label value.

If your target image was associated with a camera calibration context, positional and dimensional results are, by default, returned with respect to the relative coordinate system of the image. Otherwise, these results are returned in pixels, relative to the top-left pixel in the target image.

If your target image was associated with a camera calibration context but you want to retrieve positional and dimensional results in pixel units, use MmetControl() with the M_RESULT_OUTPUT_UNITS control type set to M_PIXEL. However, note that if you set M_RESULT_OUTPUT_UNITS to M_WORLD without specifying a calibrated image in which to calculate the results, MmetGetResult() will generate an error.

All results are returned relative to the output reference frame that you set using MmetControl() with M_OUTPUT_FRAME.

Note that this function reference has not been updated for a MIL system added during a MIL update. Refer to the MIL system's release note to see which MIL system’s documentation you should use in its place and any possible differences.
Parameters
This function is not supported on the selected boards.
This function reference has not been updated for the selected MIL system. To show the content of this page, choose a second MIL system; refer to the MIL system's release note to see which MIL system’s documentation to choose and any possible differences.
Parameters
ResultId

Specifies the identifier of the metrology result buffer from which to get results.

LabelOrIndex

Specifies the feature or geometric tolerance for which to get results. Labels must be greater than 0 while indices can be equal to 0.

To specify a context, feature, geometric tolerance, or result buffer, select the following.

function map For specifying a context, feature, tolerance, or result buffer
Click to summarizeValue Description
Click to summarize M_DEFAULT

Same as M_GENERAL.

Click to summarize

Specifies the index value of an existing individual feature for which to get results.

(summarize)
Parameters

Specifies the index.

Click to summarize

Specifies the label of an existing individual feature for which to get results.

(summarize)
Parameters

Specifies the label.

Click to summarize

Specifies the index value of an existing individual tolerance for which to get results.

(summarize)
Parameters

Specifies the index.

Click to summarize

Specifies the label value of an existing individual tolerance for which to get results.

(summarize)
Parameters

Specifies the label.

Click to summarize M_ALL_FEATURES

Specifies to return results about all features. This should be used only with M_STATUS.

(summarize)
Click to summarize M_ALL_TOLERANCES

Specifies to return results about all tolerances. This should be used only with M_STATUS.

(summarize)
Click to summarize M_CONSTRUCTED_FEATURES

Specifies to return results about all constructed features. This should be used only with M_STATUS.

(summarize)
Click to summarize M_GENERAL

Specifies that the results relating to the entire metrology context will be returned.

Click to summarize M_GLOBAL_FRAME

Specifies that information about the global frame of the context will be returned.

Click to summarize M_MEASURED_FEATURES

Specifies to return results about all measured features. This should be used only with M_STATUS.

(summarize)
ResultType

Specifies the type of result to retrieve.

See the Parameter associations section for possible values that can be specified.

ResultArrayPtr
Accepts the address of one of the following (see the Parameter associations section for specifics on which is expected):
  • array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]
  • array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]
  • array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]
  • array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]
  • array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]
  • MIL_DOUBLE
  • MIL_ID
  • MIL_INT
  • MIL_INT32
  • MIL_INT64

Specifies the address of the first element of the array in which to write the requested information.

See the Parameter associations section for possible values that can be returned.

The tables below list possible values for the ResultType parameter and possible values returned to the ResultArrayPtr parameter.

To retrieve general results, the LabelOrIndex parameter must be set to M_GENERAL.

function map For retrieving general results
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_NUMBER_OF_CONSTRUCTED_FEATURES +

Retrieves the number of constructed features.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_FEATURES +

Retrieves the total number of features. This total includes both measured features and constructed features.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_FEATURES_FAIL +

Retrieves the number of features that are not successfully calculated. The status of those features is M_FAIL.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_FEATURES_PASS +

Retrieves the number of features that are successfully calculated. The status of those features is M_PASS.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_MEASURED_FEATURES +

Retrieves the number of measured features.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_TOLERANCES +

Retrieves the number of tolerances.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_TOLERANCES_FAIL +

Retrieves the number of tolerances that have the status M_FAIL, which is the resulting status when tolerance values are smaller than M_VALUE_MIN or greater than M_VALUE_MAX.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_TOLERANCES_PASS +

Retrieves the number of tolerances that have the status M_PASS, which is the resulting status when it is not M_FAIL or M_WARNING.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_TOLERANCES_WARNING +

Retrieves the number of tolerances that have the status M_WARNING, which is the resulting status when tolerance values are greater or equal to M_VALUE_MIN and lower than M_VALUE_WARNING_MIN. It also occurs when tolerance values are lower or equal to M_VALUE_MAX and greater than M_VALUE_WARNING_MAX.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_TIMEOUT_END +

Retrieves whether the timeout has been reached. You can set the timeout limit using MmetControl() with M_TIMEOUT. By default, there is no limit.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_FALSE

Specifies that the timeout has not been reached.

Click to summarize M_TRUE

Specifies that the timeout has been reached.

To retrieve results for features, the LabelOrIndex parameter can be set to M_GLOBAL_FRAME or an existing feature label or index using M_FEATURE_LABEL() or M_FEATURE_INDEX().

function map For retrieving results for features
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_ANGLE +

Retrieves the aperture of an arc or the angle of a segment, a line, or a local frame. The angle is measured in degrees, relative to the output coordinate system specified using MmetControl() with M_RESULT_OUTPUT_UNITS.

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 26: Calibrating your camera setup.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_ANGLE_END +

Retrieves the end angle of an arc. The angle is measured in degrees, relative to the output coordinate system specified using MmetControl() with M_RESULT_OUTPUT_UNITS.

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 26: Calibrating your camera setup.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_ANGLE_START +

Retrieves the start angle of an arc. The angle is measured in degrees, relative to the output coordinate system specified using MmetControl() with M_RESULT_OUTPUT_UNITS.

An angle interpreted with respect to the pixel coordinate system is always measured counter-clockwise. For information on the angle's direction of rotation when interpreting the angle with respect to the relative coordinate system, see the Angle convention in MIL subsection of the Working with real-world units section of Chapter 26: Calibrating your camera setup.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_COVERAGE +

Retrieves the portion of the feature that was covered by the fitted edgels, as a percentage. If the fitted edgels of the feature completely cover all of the possible edgels of the feature (before the fit), M_COVERAGE returns 100%.

You can retrieve M_COVERAGE for physically measured or constructed arcs, circles, and segments. For features that have not been fit, the coverage is 100%.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_LENGTH +

Retrieves the perimeter of a circle or the length of a segment, edgel, or arc feature.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_LINE_A +

Retrieves the coefficient A of the equation for a constructed line.

The line equation is: A x + B y + C = 0.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_LINE_B +

Retrieves the coefficient B of the equation for a constructed line.

The line equation is: A x + B y + C = 0.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_LINE_C +

Retrieves the coefficient C of the equation for a constructed line.

The line equation is: A x + B y + C = 0.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER +

Retrieves the number of subfeatures in a multiple feature or the number of edgels in an edgel feature.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NUMBER_OF_GROUPS +

Retrieves the number of groups in the group edgels feature (MmetAddFeature() with M_GROUP_EDGELS).

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_POSITION_END_X +

Retrieves the X-coordinate of the ending point of a segment or arc.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_POSITION_END_Y +

Retrieves the Y-coordinate of the ending point of a segment or arc.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_POSITION_START_X +

Retrieves the X-coordinate of the starting point of a segment or arc.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_POSITION_START_Y +

Retrieves the Y-coordinate of the starting point of a segment or arc.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_POSITION_X +

Retrieves the X-coordinate of a point or edgel, the X-coordinate of the center of a circle or arc, or the X-coordinate of the origin of a local frame. For measured points and edgels, you must retrieve M_NUMBER to allocate the appropriate size of the array.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_POSITION_Y +

Retrieves the Y-coordinate of a point or edgel, the Y-coordinate of the center of a circle or arc, or the Y-coordinate of the origin of a local frame. For measured points and edgels, you must retrieve M_NUMBER to allocate the appropriate size of the array.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ] MORE
Click to summarize M_RADIUS +

Retrieves the radius of a circle or arc feature.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE

To retrieve tolerance results, the LabelOrIndex parameter can be set to an existing tolerance label or index using M_TOLERANCE_LABEL() or using M_TOLERANCE_INDEX().

function map For retrieving results for tolerances
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_TOLERANCE_VALUE +

Retrieves the calculated geometric tolerance value.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE

To retrieve results for features, the LabelOrIndex parameter can be set to M_GLOBAL_FRAME, or an existing feature label or index, using M_FEATURE_LABEL() or M_FEATURE_INDEX(), unless otherwise specified. To retrieve tolerance results, the LabelOrIndex parameter can be set to an existing tolerance label or index, using M_TOLERANCE_LABEL() or M_TOLERANCE_INDEX(), unless otherwise specified.

function map For retrieving results for features or tolerances
Click to summarize
ResultType
Description
ResultArrayPtr
- Possible values returned
Click to summarize M_LABEL_VALUE +

Retrieves the label of a specific feature or a specific tolerance.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_STATUS +

Retrieves the status of the calculation of features and tolerances.

The feature's status is determined by whether MIL was able to successfully calculate it. Some features might be mathematically valid, but their unconventional design can prove problematic. For example, you can theoretically build a valid segment feature using two points at the same location; however, you could not create an extended intersection from such a segment. MIL considers such a feature to be in a degenerated state and returns its status as M_WARNING. Features that are impossible to construct will have an M_FAIL status; for example, you cannot build a line using two points at the same location (more information is needed to fulfill the requirement that a line extends indefinitely along a directional path).

The geometric tolerance's status is determined by whether it (M_TOLERANCE_VALUE) adheres to the thresholds set using MmetControl() with M_VALUE_MAX, M_VALUE_MIN, M_VALUE_WARNING_MAX, and M_VALUE_WARNING_MIN. The following is an example of (non-zero) minimum and maximum tolerance value and warning value thresholds:

To get a global status (the status of multiple statuses), set the LabelOrIndex parameter to M_GENERAL (to get the global status of all features and tolerances), M_ALL_FEATURES (to get the global status of all features), M_CONSTRUCTED_FEATURES (to get the global status of all constructed features), M_MEASURED_FEATURES (to get the global status of all measured features), or M_ALL_TOLERANCES (to get the global status of all tolerances). When retrieving a global status, M_STATUS only returns M_PASS when each individual status is M_PASS. If any individual status is M_FAIL, M_STATUS returns M_FAIL. If there is no individual status with M_FAIL, but one or more with M_WARNING, then M_STATUS returns M_WARNING.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_FAIL

Specifies that the feature was not calculated successfully, and/or the tolerance has not passed all restrictions.

Click to summarize M_PASS

Specifies that the feature was calculated successfully, and/or the geometric tolerance has passed all restrictions.

Click to summarize M_WARNING

Specifies that the feature was calculated, or the geometric tolerance has passed all restrictions, with a warning. Warnings can be used to advise you that a feature is in a degenerated state, or that a tolerance is at its limit, and is in danger of failing.

(summarize)

You can add the following value to the above-mentioned values to determine whether a result is available.

function map For determining whether results are available
Click to summarizeResultType Description
ResultArrayPtr
- Possible values returned
Click to summarize M_AVAILABLE

Retrieves whether a result is available to be returned.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: address of a MIL_DOUBLE
Click to summarize M_NULL

Specifies that the result is not available to be retrieved.

Click to summarize Value != 0

Specifies that the result is available to be retrieved.

You can add one of the following values to the above-mentioned values to cast the requested results to the required data type.

Note: In C++, when using a standard vector (std::vector) instead of an array, the values listed in this combination table must not be used. If you need to use a specific data type, instantiate the vector with the necessary data type.

function map For specifying the data type
Click to summarizeResultType Description
ResultArrayPtr
- Possible values returned
Click to summarize M_TYPE_MIL_DOUBLE

Casts the requested results to a MIL_DOUBLE.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_DOUBLE [optionally, in C++: a reference to a std::vector<MIL_DOUBLE> ]  |  address of a MIL_DOUBLE MORE
Click to summarize M_TYPE_MIL_ID

Casts the requested results to a MIL_ID.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_ID [optionally, in C++: a reference to a std::vector<MIL_ID> ]  |  address of a MIL_ID MORE
Click to summarize M_TYPE_MIL_INT

Casts the requested results to a MIL_INT.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_INT [optionally, in C++: a reference to a std::vector<MIL_INT> ]  |  address of a MIL_INT MORE
Click to summarize M_TYPE_MIL_INT32

Casts the requested results to a MIL_INT32.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_INT32 [optionally, in C++: a reference to a std::vector<MIL_INT32> ]  |  address of a MIL_INT32 MORE
Click to summarize M_TYPE_MIL_INT64

Casts the requested results to a MIL_INT64.

(summarize)
Expand data type infoCollapse data type info ResultArrayPtr extra info
Data type info: Data type: array of type MIL_INT64 [optionally, in C++: a reference to a std::vector<MIL_INT64> ]  |  address of a MIL_INT64 MORE
Compilation information
Header Include mil.h.
Library Use mil.lib; milmetrol.lib.
DLL Requires mil.dll; milmetrol.dll.
DEFAULT ALL FEATURES ALL TOLERANCES CONSTRUCTED FEATURES GENERAL GLOBAL FRAME MEASURED FEATURES NUMBER OF CONSTRUCTED FEATURES NUMBER OF FEATURES NUMBER OF FEATURES FAIL NUMBER OF FEATURES PASS NUMBER OF MEASURED FEATURES NUMBER OF TOLERANCES NUMBER OF TOLERANCES FAIL NUMBER OF TOLERANCES PASS NUMBER OF TOLERANCES WARNING TIMEOUT END FALSE TRUE ANGLE ANGLE END ANGLE START COVERAGE LENGTH LINE A LINE B LINE C NUMBER NUMBER OF GROUPS POSITION END X POSITION END Y POSITION START X POSITION START Y POSITION X POSITION Y RADIUS TOLERANCE VALUE LABEL VALUE STATUS FAIL PASS WARNING AVAILABLE NULL TYPE MIL DOUBLE TYPE MIL ID TYPE MIL INT TYPE MIL INT32 TYPE MIL INT64 GENERAL DEFAULT GLOBAL FRAME ALL FEATURES ALL TOLERANCES CONSTRUCTED FEATURES MEASURED FEATURES