Dimension Line Functions

Functions to get and set attributes, start/end positions, normal, and text properties of dimension line objects.

MTK_Object_DimensionLine_GetAttributes()

Get the attributes of a dimension line object.

Signature
int MTK_Object_DimensionLine_GetAttributes(
    MTK_Object* obj,
    char* label, double* tickGap,
    double* tickOffset, double* tickExtentSize,
    double* arrowLength, double* arrowWidth
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • label: Buffer of length MTK_BUFFER_SIZE to receive the label of the dimension line.
  • tickGap: Tick gap.
  • tickOffset: Tick offset.
  • tickExtentSize: Tick extent size.
  • arrowLength: Length of the arrow head.
  • arrowWidth: Width of the arrow head.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_GetEnd()

Get the end location of a dimension line object.

Signature
int MTK_Object_DimensionLine_GetEnd(
    MTK_Object* obj,
    double* x, double* y, double* z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • x: End x value.
  • y: End y value.
  • z: End z value.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_GetNormal()

Get the normal of a dimension line object.

Signature
int MTK_Object_DimensionLine_GetNormal(
    MTK_Object* obj,
    double* x, double* y, double* z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • x: Normal x value.
  • y: Normal y value.
  • z: Normal z value.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_GetNormal()

Get the normal of a dimension line object.

Signature
int MTK_Object_DimensionLine_GetNormal(
    MTK_Object* obj,
    double* x, double* y, double* z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • x: Normal x value.
  • y: Normal y value.
  • z: Normal z value.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_GetStart()

Get the start location of a dimension line object.

Signature
int MTK_Object_DimensionLine_GetStart(
    MTK_Object* obj,
    double* x, double* y, double* z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • x: Start x value.
  • y: Start y value.
  • z: Start z value.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_GetTextAttributes()

Get the attributes of the text on a dimension line object.

Signature
int MTK_Object_DimensionLine_GetTextAttributes(
    MTK_Object* obj,
    char* font, char* scale,
    double* height,
    MTK_Object_TextVertPos* textLocation
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • font: Buffer of length MTK_BUFFER_SIZE to receive the font of the text.
  • scale: Buffer of length MTK_BUFFER_SIZE to receive the scale of the text.
  • height: Height of the text.
  • textLocation: Location of the text relative to the dimension line.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_SetAttributes()

Set the attributes of a dimension line object.

Signature
int MTK_Object_DimensionLine_SetAttributes(
    MTK_Object* obj,
    const char* label, const double& tickGap,
    const double& tickOffset, const double& tickExtentSize,
    const double& arrowLength, const double& arrowWidth
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • label: Label of the dimension line.
  • tickGap: Tick gap.
  • tickOffset: Tick offset.
  • tickExtentSize: Tick extent size.
  • arrowLength: Length of the arrow head.
  • arrowWidth: Width of the arrow head.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_SetEnd()

Set the end location of a dimension line object.

Signature
int MTK_Object_DimensionLine_SetEnd(
    MTK_Object* obj,
    const double& x,
    const double& y,
    const double& z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • x: End x value.
  • y: End y value.
  • z: End z value.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_SetNormal()

Set the normal of a dimension line object.

Signature
int MTK_Object_DimensionLine_SetNormal(
    MTK_Object* obj,
    const double& x,
    const double& y,
    const double& z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • x: Normal x value.
  • y: Normal y value.
  • z: Normal z value.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_SetStart()

Set the start location of a dimension line object.

Signature
int MTK_Object_DimensionLine_SetStart(
    MTK_Object* obj,
    const double& x,
    const double& y,
    const double& z
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • x: Start x value.
  • y: Start y value.
  • z: Start z value.
Returns

0 on success; any other value indicates failure.

MTK_Object_DimensionLine_SetTextAttributes()

Set the attributes of the text on a dimension line object.

Signature
int MTK_Object_DimensionLine_SetTextAttributes(
    MTK_Object* obj,
    const char* font, const char* scale,
    const double& height,
    const MTK_Object_TextVertPos& textLocation
    );
Parameters
  • obj: Pointer to an MTK_Object struct.
  • font: Font of the text on the dimension line.
  • scale: Scale of the text on the dimension line.
  • height: Height of the text on the dimension line.
  • textLocation: Location of the text relative to the dimension line.
Returns

0 on success; any other value indicates failure.