| MIL 10 Reference
| Customize Help
| Save Settings

MmetName



See also
Availability
Not available in MIL-Lite
Available in MIL

Available on Windows
Available on Linux

Available on Non-Matrox computer
Available on Matrox 4Sight-X
Available on Matrox 4Sight GP
Available on Matrox Supersight
function map Function map
Examples
Synopsis
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(
MIL_ID ContextOrResultId, //in
MIL_INT64 Operation, //in
MIL_INT LabelOrIndex, //in
MIL_TEXT_PTR String, //in-out
MIL_INT *ValuePtr, //out
MIL_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.

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 if there is complementary information.
Parameters
This function is not supported on the selected boards.
Parameters
ContextOrResultId

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.

When the Operation parameter is set to M_SET_NAME, this parameter must be a context ID. Otherwise, this parameter can be either a context or a result ID.

Operation

Specifies the type of operation to perform.

function map For specifying the operation to perform
CollapseValue Description
Collapse M_GET_FEATURE_INDEX

Retrieves the index of a feature based on its name.

This operation requires ContextOrResultId to be either a valid context identifier or a valid result buffer identifier.

If there is no feature with the specified name, the returned index is -1.

(summarize)
Collapse M_GET_FEATURE_LABEL

Retrieves the label of a feature based on its name.

This operation requires ContextOrResultId to be either a valid context identifier or a valid result buffer identifier.

If there is no feature with the specified name, the returned label is 0.

(summarize)
Collapse M_GET_NAME

Retrieves the name of the feature or tolerance defined by the LabelOrIndex parameter.

This operation requires ContextOrResultId to be either a valid context identifier or a valid result buffer identifier. The name of the feature or tolerance is returned via the String parameter, and the name's length is returned via the ValuePtr parameter.

(summarize)
Collapse M_GET_TOLERANCE_INDEX

Retrieves the index of a tolerance based on its name.

This operation requires ContextOrResultId to be either a valid context identifier or a valid result buffer identifier.

If there is no tolerance with the specified name, the returned index is -1.

(summarize)
Collapse M_GET_TOLERANCE_LABEL

Retrieves the label of a tolerance based on its name.

This operation requires ContextOrResultId to be either a valid context identifier or a valid result buffer identifier.

If there is no tolerance with the specified name, the returned label is 0.

(summarize)
Collapse 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 name of the feature or tolerance to set (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.

(summarize)
LabelOrIndex

Specifies the label or index value of the metrology feature or tolerance.

String

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

Set this parameter to M_NULL and the Operation parameter to M_SET_NAME to release a name.

Note that when setting a feature or tolerance name with the String parameter, the name must be unique (this does not apply when Operation is set to M_GET_NAME).

ValuePtr

Specifies the address at which to write the requested information.

This parameter must be set to M_NULL when not in use.

ControlFlag

Reserved for future expansion and must be set to M_DEFAULT.

Compilation information
Header Include mil.h.
Library Use mil.lib; milmetrol.lib.
DLL Requires mil.dll; milmetrol.dll.
GET FEATURE INDEX GET FEATURE LABEL GET NAME GET TOLERANCE INDEX GET TOLERANCE LABEL SET NAME