LayOut C API

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Enumerations | Functions
lineardimension.h File Reference
`#include <LayOutAPI/common.h>`
`#include <LayOutAPI/geometry/geometry.h>`
`#include <LayOutAPI/model/defs.h>`

Go to the source code of this file.

## Enumerations
enum | LOLinearDimensionLeaderLineType { LOLinearDimensionLeaderLineType_SingleSegment = 0, LOLinearDimensionLeaderLineType_TwoSegment, LOLinearDimensionLeaderLineType_Bezier, LOLinearDimensionLeaderLineType_Hidden, LONumLinearDimensionLeaderLineTypes }
| Defines the different types of leader lines for a linear dimension entity. More...
enum | LOLinearDimensionAlignment { LOLinearDimensionAlignment_Aligned = 0, LOLinearDimensionAlignment_Vertical, LOLinearDimensionAlignment_Horizontal, LONumLinearDimensionAlignments }
| Defines how the dimension line should align on the page when creating a new linear dimension. More...

## Functions
LO_RESULT | LOLinearDimensionCreate (LOLinearDimensionRef *dimension, const LOPoint2D *start_point, const LOPoint2D *end_point, double height)
| Creates a new disconnected linear dimension object. More...
LO_RESULT | LOLinearDimensionCreateWithAlignment (LOLinearDimensionRef *dimension, const LOPoint2D *start_point, const LOPoint2D *end_point, double height, LOLinearDimensionAlignment alignment)
| Creates a new disconnected linear dimension object with a specific dimension line alignment. More...
LO_RESULT | LOLinearDimensionAddReference (LOLinearDimensionRef dimension)
| Adds a reference to a linear dimension object. More...
LO_RESULT | LOLinearDimensionRelease (LOLinearDimensionRef *dimension)
| Releases a linear dimension object. The object will be invalidated if releasing the last reference. More...
LO_EXPORT LOLinearDimensionRef | LOLinearDimensionFromEntity (LOEntityRef entity)
| Converts from a LOEntityRef to a LOLinearDimensionRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOLinearDimensionRef. More...
LO_EXPORT LOEntityRef | LOLinearDimensionToEntity (LOLinearDimensionRef dimension)
| Converts from a LOLinearDimensionRef to a LOEntityRef. This is essentially an upcast operation. More...
LO_RESULT | LOLinearDimensionGetExplodedEntities (LOLinearDimensionRef dimension, LOEntityListRef entity_list)
| Creates the entities that represent the dimension in its exploded form and adds them to a LOEntityListRef. It is NOT necessary to explicitly release these entities, since LOEntityListRef itself adds a reference to the entities and will release them when they are removed from the list or when the list is released. Depending on the appearance of the dimension being exploded, this may return anywhere from four to six entities. Start extension line, end extension line, one or two dimension lines, dimension text, optional leader line. More...
LO_RESULT | LOLinearDimensionGetUsesCustomText (LOLinearDimensionRef dimension, bool *use_custom_text)
| Gets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically. More...
LO_RESULT | LOLinearDimensionSetUsesCustomText (LOLinearDimensionRef dimension, bool use_custom_text)
| Sets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically. More...
LO_RESULT | LOLinearDimensionCreateDimensionTextCopy (LOLinearDimensionRef dimension, LOFormattedTextRef *text)
| Creates a copy of the dimension text's LOFormattedTextRef object. More...
LO_RESULT | LOLinearDimensionSetDimensionText (LOLinearDimensionRef dimension, LOFormattedTextRef text)
| Sets the text of the dimension from a LOFormattedTextRef object. The dimension lines may be adjusted if the text has been re-positioned. More...
LO_RESULT | LOLinearDimensionGetLeaderLineType (LOLinearDimensionRef dimension, LOLinearDimensionLeaderLineType *leader_line_type)
| Gets the type of leader line the linear dimension is using. More...
LO_RESULT | LOLinearDimensionSetLeaderLineType (LOLinearDimensionRef dimension, LOLinearDimensionLeaderLineType leader_line_type)
| Sets the type of leader line the linear dimension is using. New control points will be generated if changing to a two segment or bezier leader line type. Setting the leader line type to LOLinearDimensionLeaderLineType_Hidden will not move the dimension text. More...
LO_RESULT | LOLinearDimensionGetLeaderLineVisible (LOLinearDimensionRef dimension, bool *leader_line_visible)
| Gets whether the linear dimension's leader line is visible. More...
LO_RESULT | LOLinearDimensionGetUsesAutoScale (LOLinearDimensionRef dimension, bool *use_auto_scale)
| Gets whether or not the scale for the dimension length text is set automatically. More...
LO_RESULT | LOLinearDimensionSetUsesAutoScale (LOLinearDimensionRef dimension, bool use_auto_scale)
| Sets whether or not the scale for the dimension length text is set automatically. More...
LO_RESULT | LOLinearDimensionGetScale (LOLinearDimensionRef dimension, double *scale)
| Gets the scale being used for the dimension length text. More...
LO_RESULT | LOLinearDimensionSetScale (LOLinearDimensionRef dimension, double scale)
| Sets the scale being used for the dimension length text. This will also make the scale not use auto-scale. More...
LO_RESULT | LOLinearDimensionGetStartConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Gets the page location for the first connection. More...
LO_RESULT | LOLinearDimensionSetStartConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Sets the page location for the first connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo. More...
LO_RESULT | LOLinearDimensionGetEndConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Gets the page location for the second connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo. More...
LO_RESULT | LOLinearDimensionSetEndConnectionPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Sets the page location for the second connection. More...
LO_RESULT | LOLinearDimensionGetStartExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Gets the page location for the start of the dimension line. More...
LO_RESULT | LOLinearDimensionSetStartExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Sets the page location for the start of the dimension line. This will also adjust the end of the dimension line to maintain the correct dimension line length. More...
LO_RESULT | LOLinearDimensionGetEndExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Gets the page location for the end of the dimension line. More...
LO_RESULT | LOLinearDimensionSetEndExtentPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Sets the page location for the end of the dimension line. This will also adjust the start of the dimension line to maintain the correct dimension line length. More...
LO_RESULT | LOLinearDimensionGetStartOffsetPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Gets the page location for the start of the first extension line. The first extension line runs from this offset point to the start extent point. More...
LO_RESULT | LOLinearDimensionGetEndOffsetPoint (LOLinearDimensionRef dimension, LOPoint2D *point)
| Gets the page location for the start of the second extension line. The second extension line runs from this offset point to the end extent point. More...
LO_RESULT | LOLinearDimensionSetStartOffsetLength (LOLinearDimensionRef dimension, double length)
| Sets the length of the offset from the first connection point to the start of the first extension line. The connection and extent points will not move. More...
LO_RESULT | LOLinearDimensionSetEndOffsetLength (LOLinearDimensionRef dimension, double length)
| Sets the length of the offset from the second connection point to the start of the second extension line. The connection and extent points will not move. More...
LO_RESULT | LOLinearDimensionConnectTo (LOLinearDimensionRef dimension, LOConnectionPointRef start_point, LOConnectionPointRef end_point)
| Connects the linear dimension to the given connection points. If both the linear dimension and the connection point's entities are on non-shared layers, they must be on the same page. More...
LO_RESULT | LOLinearDimensionDisconnect (LOLinearDimensionRef dimension)
| Disconnects the linear dimension from its connection points. The dimension will not be adjusted by disconnecting from its connection points. More...

## Enumeration Type Documentation

enum LOLinearDimensionAlignment

Defines how the dimension line should align on the page when creating a new linear dimension.

Since
  LayOut 2026.0, API 11.0

Enumerator
LOLinearDimensionAlignment_Aligned |
LOLinearDimensionAlignment_Vertical | Align the dimension line with the connection points.
LOLinearDimensionAlignment_Horizontal | Align the dimension line vertically on the paper.
LONumLinearDimensionAlignments | Align the dimension line horizontally on the paper.

enum LOLinearDimensionLeaderLineType

Defines the different types of leader lines for a linear dimension entity.

Enumerator
LOLinearDimensionLeaderLineType_SingleSegment | Single segment leader line.
LOLinearDimensionLeaderLineType_TwoSegment | Two segment leader line.
LOLinearDimensionLeaderLineType_Bezier | Curved Bezier leader line.
LOLinearDimensionLeaderLineType_Hidden | No visible leader line.
LONumLinearDimensionLeaderLineTypes |

## Function Documentation

LO_RESULT LOLinearDimensionAddReference | ( | LOLinearDimensionRef | dimension | ) |

Adds a reference to a linear dimension object.

Parameters

  [in] | dimension | The linear dimension object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object

LO_RESULT LOLinearDimensionConnectTo | ( | LOLinearDimensionRef | dimension,
|  | LOConnectionPointRef | start_point,
|  | LOConnectionPointRef | end_point
| ) |  |

Connects the linear dimension to the given connection points. If both the linear dimension and the connection point's entities are on non-shared layers, they must be on the same page.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | start_point | The first connection point object.
  [in] | end_point | The second connection point object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if start_point does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if end_point does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked
  - SU_ERROR_GENERIC if the linear dimension was unable to connect to the connection points

LO_RESULT LOLinearDimensionCreate | ( | LOLinearDimensionRef * | dimension,
|  | const LOPoint2D * | start_point,
|  | const LOPoint2D * | end_point,
|  | double | height
| ) |  |

Creates a new disconnected linear dimension object.

Parameters

  [out] | dimension | The linear dimension object
  [in] | start_point | Where the dimension should start
  [in] | end_point | Where the dimension should end
  [in] | height | Distance from the start and end points to the dimension line

Note
  This is equivalent to using LOLinearDimensionCreateWithAlignment with LOLinearDimensionAlignment_Aligned.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if dimension is NULL
  - SU_ERROR_OVERWRITE_VALID if *dimension already refers to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if start_point is NULL
  - SU_ERROR_NULL_POINTER_INPUT if end_point is NULL

LO_RESULT LOLinearDimensionCreateDimensionTextCopy | ( | LOLinearDimensionRef | dimension,
|  | LOFormattedTextRef * | text
| ) |  |

Creates a copy of the dimension text's LOFormattedTextRef object.

Note
  With the addition of auto-text in dimensions for LayOut 2019.2, the copy of the dimension text incorrectly provided the plain text when requesting the display text. This has been fixed in LayOut 2020.1, API 5.1.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | text | The formatted text object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if text is NULL
  - SU_ERROR_OVERWRITE_VALID if *text already refers to a valid object

LO_RESULT LOLinearDimensionCreateWithAlignment | ( | LOLinearDimensionRef * | dimension,
|  | const LOPoint2D * | start_point,
|  | const LOPoint2D * | end_point,
|  | double | height,
|  | LOLinearDimensionAlignment | alignment
| ) |  |

Creates a new disconnected linear dimension object with a specific dimension line alignment.

Parameters

  [out] | dimension | The linear dimension object
  [in] | start_point | Where the dimension should start
  [in] | end_point | Where the dimension should end
  [in] | height | Distance from the start point to the dimension line. Negative height will create a dimension line to the left or down from the connection points
  [in] | alignment | Dimension line alignment type. The dimension line can be horizontal, vertical, or aligned with the connection points.

Since
  LayOut 2026.0, API 11.0

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if `dimension` is NULL
  - SU_ERROR_OVERWRITE_VALID if *dimension already refers to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if `start_point` is NULL
  - SU_ERROR_NULL_POINTER_INPUT if `end_point` is NULL
  - SU_ERROR_OUT_OF_RANGE if `alignment` is not a valid value
  - SU_ERROR_INVALID_ARGUMENT if the combination of start_point, end_point, and alignment can't create a valid dimension.

LO_RESULT LOLinearDimensionDisconnect | ( | LOLinearDimensionRef | dimension | ) |

Disconnects the linear dimension from its connection points. The dimension will not be adjusted by disconnecting from its connection points.

Parameters

  [in] | dimension | The linear dimension object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_EXPORT LOLinearDimensionRef LOLinearDimensionFromEntity | ( | LOEntityRef | entity | ) |

Converts from a LOEntityRef to a LOLinearDimensionRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOLinearDimensionRef.

Parameters

  [in] | entity | The entity object.

Returns
  - The converted LOLinearDimensionRef if the downcast operation succeeds
  - If not, the returned reference will be invalid

LO_RESULT LOLinearDimensionGetEndConnectionPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Gets the page location for the second connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | point | The position of the second control point.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if point is NULL

LO_RESULT LOLinearDimensionGetEndExtentPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Gets the page location for the end of the dimension line.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | point | The position of the end of the dimension line.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if point is NULL

LO_RESULT LOLinearDimensionGetEndOffsetPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Gets the page location for the start of the second extension line. The second extension line runs from this offset point to the end extent point.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | point | The position of the end of the dimension line.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if point is NULL

LO_RESULT LOLinearDimensionGetExplodedEntities | ( | LOLinearDimensionRef | dimension,
|  | LOEntityListRef | entity_list
| ) |  |

Creates the entities that represent the dimension in its exploded form and adds them to a LOEntityListRef. It is NOT necessary to explicitly release these entities, since LOEntityListRef itself adds a reference to the entities and will release them when they are removed from the list or when the list is released. Depending on the appearance of the dimension being exploded, this may return anywhere from four to six entities. Start extension line, end extension line, one or two dimension lines, dimension text, optional leader line.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | entity_list | The entity list object to add the new entities to.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if entity_list does not refer to a valid object

LO_RESULT LOLinearDimensionGetLeaderLineType | ( | LOLinearDimensionRef | dimension,
|  | LOLinearDimensionLeaderLineType * | leader_line_type
| ) |  |

Gets the type of leader line the linear dimension is using.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | leader_line_type | The leader line type.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if leader_line_type is NULL

LO_RESULT LOLinearDimensionGetLeaderLineVisible | ( | LOLinearDimensionRef | dimension,
|  | bool * | leader_line_visible
| ) |  |

Gets whether the linear dimension's leader line is visible.

Note
  This will return false if the leader line type is set to hidden or the leader line's length is zero.

Since
  LayOut 2026.0, API 11.0

Parameters

  [in] | dimension | The linear dimension object.
  [out] | leader_line_visible | Whether the dimension's leader line is visible.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if `dimension` does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if `leader_line_visible` is NULL

LO_RESULT LOLinearDimensionGetScale | ( | LOLinearDimensionRef | dimension,
|  | double * | scale
| ) |  |

Gets the scale being used for the dimension length text.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | scale | The dimension text scale.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if scale is NULL

LO_RESULT LOLinearDimensionGetStartConnectionPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Gets the page location for the first connection.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | point | The position of the first connection point.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if point is NULL

LO_RESULT LOLinearDimensionGetStartExtentPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Gets the page location for the start of the dimension line.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | point | The position of the start of the dimension line.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if point is NULL

LO_RESULT LOLinearDimensionGetStartOffsetPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Gets the page location for the start of the first extension line. The first extension line runs from this offset point to the start extent point.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | point | The position of the start of the extension line.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if point is NULL

LO_RESULT LOLinearDimensionGetUsesAutoScale | ( | LOLinearDimensionRef | dimension,
|  | bool * | use_auto_scale
| ) |  |

Gets whether or not the scale for the dimension length text is set automatically.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | use_auto_scale | Whether the dimension is using auto scale or not.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if use_auto_scale is NULL

LO_RESULT LOLinearDimensionGetUsesCustomText | ( | LOLinearDimensionRef | dimension,
|  | bool * | use_custom_text
| ) |  |

Gets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically.

Parameters

  [in] | dimension | The linear dimension object.
  [out] | use_custom_text | Whether the dimension uses custom text.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if use_auto_text is NULL

LO_RESULT LOLinearDimensionRelease | ( | LOLinearDimensionRef * | dimension | ) |

Releases a linear dimension object. The object will be invalidated if releasing the last reference.

Parameters

  [in] | dimension | The linear dimension object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if dimension is NULL
  - SU_ERROR_INVALID_INPUT if *dimension does not refer to a valid object

LO_RESULT LOLinearDimensionSetDimensionText | ( | LOLinearDimensionRef | dimension,
|  | LOFormattedTextRef | text
| ) |  |

Sets the text of the dimension from a LOFormattedTextRef object. The dimension lines may be adjusted if the text has been re-positioned.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | text | The formatted text object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_INVALID_INPUT if text does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetEndConnectionPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Sets the page location for the second connection.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | point | The position for the second control point.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetEndExtentPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Sets the page location for the end of the dimension line. This will also adjust the start of the dimension line to maintain the correct dimension line length.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | point | The position of the end of the dimension line.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetEndOffsetLength | ( | LOLinearDimensionRef | dimension,
|  | double | length
| ) |  |

Sets the length of the offset from the second connection point to the start of the second extension line. The connection and extent points will not move.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | length | The length the offset to the extension line should be.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetLeaderLineType | ( | LOLinearDimensionRef | dimension,
|  | LOLinearDimensionLeaderLineType | leader_line_type
| ) |  |

Sets the type of leader line the linear dimension is using. New control points will be generated if changing to a two segment or bezier leader line type. Setting the leader line type to LOLinearDimensionLeaderLineType_Hidden will not move the dimension text.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | leader_line_type | The leader line type.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if leader_line_type is not a valid value
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetScale | ( | LOLinearDimensionRef | dimension,
|  | double | scale
| ) |  |

Sets the scale being used for the dimension length text. This will also make the scale not use auto-scale.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | scale | The new scale to use.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if scale is not positive or scale is greater than 1
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetStartConnectionPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Sets the page location for the first connection. This will cause the dimension to become disconnected. To make a connected dimension, call LOLinearDimensionConnectTo.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | point | The position for the first connection point.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetStartExtentPoint | ( | LOLinearDimensionRef | dimension,
|  | LOPoint2D * | point
| ) |  |

Sets the page location for the start of the dimension line. This will also adjust the end of the dimension line to maintain the correct dimension line length.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | point | The position of the start of the dimension line.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetStartOffsetLength | ( | LOLinearDimensionRef | dimension,
|  | double | length
| ) |  |

Sets the length of the offset from the first connection point to the start of the first extension line. The connection and extent points will not move.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | length | The length the offset to the extension line should be.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_RESULT LOLinearDimensionSetUsesAutoScale | ( | LOLinearDimensionRef | dimension,
|  | bool | use_auto_scale
| ) |  |

Sets whether or not the scale for the dimension length text is set automatically.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | use_auto_scale | Whether the dimension should use auto scale or not.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer

LO_RESULT LOLinearDimensionSetUsesCustomText | ( | LOLinearDimensionRef | dimension,
|  | bool | use_custom_text
| ) |  |

Sets whether or not the dimension text uses custom text. When true, the dimension text will display a custom string that doesn't change. When false, the dimension text will display the length measurement and will update automatically.

Parameters

  [in] | dimension | The linear dimension object.
  [in] | use_custom_text | Whether or not the dimension should use custom text.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if dimension does not refer to a valid object
  - SU_ERROR_LAYER_LOCKED if dimension is on a locked layer
  - SU_ERROR_ENTITY_LOCKED if dimension is locked

LO_EXPORT LOEntityRef LOLinearDimensionToEntity | ( | LOLinearDimensionRef | dimension | ) |

Converts from a LOLinearDimensionRef to a LOEntityRef. This is essentially an upcast operation.

Parameters

  [in] | dimension | The linear dimension object.

Returns
  - The converted LOEntityRef if dimension is a valid object
  - If not, the returned reference will be invalid