Skip to main content

MmetName

BoardSupported
Host SystemYes
V4L2Yes
Clarity UHDYes
Concord PoENo
GenTLYes
GevIQYes
GigE VisionYes
IndioNo
Iris GTXYes
Radient eV-CLYes
Rapixo CLYes
Rapixo CoFYes
Rapixo CXPYes
USB3 VisionYes

Set or retrieve the name of a feature or tolerance, or retrieve the label or index of a specified feature or tolerance.

Syntax

void MmetName(
AIL_ID ContextOrResultId, //out
AIL_INT64 Operation, //in
AIL_INT LabelOrIndex, //in
AIL_TEXT_PTR String, //in-out
AIL_INT * ValuePtr, //out
AIL_INT64 ControlFlag //in
)

Description

This function allows you to set or retrieve the name of a metrology feature or tolerance. It also allows you to retrieve either the label or index of a feature or tolerance based on its name.

Note that MmetName supports Unicode.

Parameters

ContextOrResultId (out, AIL_ID)

Specifies the identifier of the metrology context or result buffer containing the feature or tolerance to read or modify. The metrology context or the metrology result buffer must have been previously allocated on the required system using MmetAlloc or MmetAllocResult, respectively.

Operation (in, AIL_INT64)

Specifies the type of operation to perform.

For specifying the operation to perform

ValueDescription
M_GET_FEATURE_INDEXRetrieves the index of a feature, based on its name. Set the LabelOrIndex parameter to M_DEFAULT.

If there is no feature with the specified name, the returned index is -1. | | M_GET_FEATURE_LABEL | Retrieves the label of a feature, based on its name. Set the LabelOrIndex parameter to M_DEFAULT.

If there is no feature with the specified name, the returned label is 0. | | M_GET_NAME | Retrieves the name of the feature or tolerance defined by the LabelOrIndex parameter.

The name of the feature or tolerance is returned via the String parameter, and the name's length is returned via the ValuePtr parameter.

To determine the exact size name, call this function twice, the first time to determine the size of the name, with the String parameter set to M_NULL, and the second time to return the name. | | M_GET_TOLERANCE_INDEX | Retrieves the index of a tolerance, based on its name. Set the LabelOrIndex parameter to M_DEFAULT.

If there is no tolerance with the specified name, the returned index is -1. | | M_GET_TOLERANCE_LABEL | Retrieves the label of a tolerance, based on its name. Set the LabelOrIndex parameter to M_DEFAULT.

If there is no tolerance with the specified name, the returned label is 0. | | M_SET_NAME | Sets the name of the feature or tolerance defined by the LabelOrIndex parameter.

This operation requires ContextOrResultId to be a valid context identifier. In addition, the specified name of the feature or tolerance (passed in the String parameter) must be unique, and ValuePtr must be set to M_NULL.

Note that you can release a name by passing M_NULL to String. |

LabelOrIndex (in, AIL_INT)

Specifies the label or index value of the metrology feature or tolerance. Set this parameter to M_DEFAULT when not required by the name operation.

For specifying the label or index value

ValueDescription
M_FEATURE_INDEXSpecifies a feature by indicating its index.
M_FEATURE_LABELSpecifies a feature by indicating its label.
M_TOLERANCE_INDEXSpecifies a tolerance by indicating its index.
M_TOLERANCE_LABELSpecifies a tolerance by indicating its label.

String (in-out, AIL_TEXT_PTR)

Specifies the name to set or retrieve, depending on the Operation parameter.

ValuePtr *(out, AIL_INT)

Specifies the address at which to write the requested information.

ControlFlag (in, AIL_INT64)

Reserved for future expansion and must be set to M_DEFAULT.

Copyright © 2026 Zebra Technologies.