LayOut C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Enumerations | Functions
angulardimension.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  LOAngularDimensionLeaderLineType {
  LOAngularDimensionLeaderLineType_SingleSegment = 0, LOAngularDimensionLeaderLineType_TwoSegment, LOAngularDimensionLeaderLineType_Bezier, LOAngularDimensionLeaderLineType_Hidden,
  LONumAngularDimensionLeaderLineTypes
}
 Defines the different types of leader lines for an angular dimension entity. More...
 

Functions

LO_RESULT LOAngularDimensionCreate (LOAngularDimensionRef *dimension, const LOPoint2D *start_point, const LOPoint2D *end_point, const LOPoint2D *start_extent_point, const LOPoint2D *end_extent_point, bool inner_angle)
 Creates a new disconnected angular dimension object. The arc center point is defined implicitly by the intersection of the two extension lines, and the radius is defined implicitly by the distance of the extent points from the arc center point. If the extent points are not equidistant from the arc center point, then the end extent point is adjusted automatically. More...
 
LO_RESULT LOAngularDimensionAddReference (LOAngularDimensionRef dimension)
 Adds a reference to an angular dimension object. More...
 
LO_RESULT LOAngularDimensionRelease (LOAngularDimensionRef *dimension)
 Releases an angular dimension object. The object will be invalidated if releasing the last reference. More...
 
LO_EXPORT LOAngularDimensionRef LOAngularDimensionFromEntity (LOEntityRef entity)
 Converts from a LOEntityRef to a LOAngularDimensionRef. This is essentially a downcast operation so the given LOEntityRef must be convertible to a LOAngularDimensionRef. More...
 
LO_EXPORT LOEntityRef LOAngularDimensionToEntity (LOAngularDimensionRef dimension)
 Converts from a LOAngularDimensionRef to a LOEntityRef. This is essentially an upcast operation. More...
 
LO_RESULT LOAngularDimensionGetExplodedEntities (LOAngularDimensionRef 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 LOAngularDimensionGetUsesCustomText (LOAngularDimensionRef 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 LOAngularDimensionSetUsesCustomText (LOAngularDimensionRef 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 LOAngularDimensionCreateDimensionTextCopy (LOAngularDimensionRef dimension, LOFormattedTextRef *text)
 Creates a copy of the dimension text's LOFormattedTextRef object. More...
 
LO_RESULT LOAngularDimensionSetDimensionText (LOAngularDimensionRef 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 LOAngularDimensionGetLeaderLineType (LOAngularDimensionRef dimension, LOAngularDimensionLeaderLineType *leader_line_type)
 Gets the type of leader line the angular dimension is using. More...
 
LO_RESULT LOAngularDimensionSetLeaderLineType (LOAngularDimensionRef dimension, LOAngularDimensionLeaderLineType leader_line_type)
 Sets the type of leader line the angular 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 LOAngularDimensionLeaderLineType_Hidden will not move the dimension text. More...
 
LO_RESULT LOAngularDimensionGetStartConnectionPoint (LOAngularDimensionRef dimension, LOPoint2D *point)
 Gets the page location for the first connection. More...
 
LO_RESULT LOAngularDimensionSetStartConnectionPoint (LOAngularDimensionRef dimension, const LOPoint2D *point)
 Sets the page location for the first connection. More...
 
LO_RESULT LOAngularDimensionGetEndConnectionPoint (LOAngularDimensionRef dimension, LOPoint2D *point)
 Gets the page location for the second connection. More...
 
LO_RESULT LOAngularDimensionSetEndConnectionPoint (LOAngularDimensionRef dimension, const LOPoint2D *point)
 Sets the page location for the second connection. More...
 
LO_RESULT LOAngularDimensionGetStartExtentPoint (LOAngularDimensionRef dimension, LOPoint2D *point)
 Gets the page location for the start of the dimension line. More...
 
LO_RESULT LOAngularDimensionSetStartExtentPoint (LOAngularDimensionRef dimension, const 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 LOAngularDimensionGetEndExtentPoint (LOAngularDimensionRef dimension, LOPoint2D *point)
 Gets the page location for the end of the dimension line. More...
 
LO_RESULT LOAngularDimensionSetEndExtentPoint (LOAngularDimensionRef dimension, const 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 LOAngularDimensionGetStartOffsetPoint (LOAngularDimensionRef 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 LOAngularDimensionGetEndOffsetPoint (LOAngularDimensionRef 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 LOAngularDimensionSetStartOffsetLength (LOAngularDimensionRef 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 LOAngularDimensionSetEndOffsetLength (LOAngularDimensionRef 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 LOAngularDimensionGetArcCenterPoint (LOAngularDimensionRef dimension, LOPoint2D *point)
 Gets the page location for the dimension arc center point. More...
 
LO_RESULT LOAngularDimensionGetRadius (LOAngularDimensionRef dimension, double *radius)
 Gets the angular dimension's radius. This is the distance from the arc center point to the dimension line. More...
 
LO_RESULT LOAngularDimensionSetRadius (LOAngularDimensionRef dimension, double radius)
 Sets the angular dimension's radius. This is the distance from the arc center point to the dimension line. More...
 
LO_RESULT LOAngularDimensionGetAngle (LOAngularDimensionRef dimension, double *angle)
 Gets the angular dimension's angle. The angle is represented in radians. More...
 

Enumeration Type Documentation

Defines the different types of leader lines for an angular dimension entity.

Since
LayOut 2017, API 2.0
Enumerator
LOAngularDimensionLeaderLineType_SingleSegment 

Single segment leader line.

LOAngularDimensionLeaderLineType_TwoSegment 

Two segment leader line.

LOAngularDimensionLeaderLineType_Bezier 

Curved Bezier leader line.

LOAngularDimensionLeaderLineType_Hidden 

No visible leader line.

LONumAngularDimensionLeaderLineTypes 

Function Documentation

LO_RESULT LOAngularDimensionAddReference ( LOAngularDimensionRef  dimension)

Adds a reference to an angular dimension object.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
Returns
LO_RESULT LOAngularDimensionCreate ( LOAngularDimensionRef dimension,
const LOPoint2D start_point,
const LOPoint2D end_point,
const LOPoint2D start_extent_point,
const LOPoint2D end_extent_point,
bool  inner_angle 
)

Creates a new disconnected angular dimension object. The arc center point is defined implicitly by the intersection of the two extension lines, and the radius is defined implicitly by the distance of the extent points from the arc center point. If the extent points are not equidistant from the arc center point, then the end extent point is adjusted automatically.

Since
LayOut 2017, API 2.0
Parameters
[out]dimensionThe angular dimension object
[in]start_pointWhere the dimension should start
[in]end_pointWhere the dimension should end
[in]start_extent_pointThe extent point where the dimension line should start
[in]end_extent_pointThe extent point where the dimension line should end
[in]inner_angleWhether or not the dimension should measure the inner angle. If false, it will measure the outer angle.
Returns
LO_RESULT LOAngularDimensionCreateDimensionTextCopy ( LOAngularDimensionRef  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.
Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]textThe formatted text object.
Returns
LO_EXPORT LOAngularDimensionRef LOAngularDimensionFromEntity ( LOEntityRef  entity)

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

Since
LayOut 2017, API 2.0
Parameters
[in]entityThe entity object.
Returns
  • The converted LOAngularDimensionRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
LO_RESULT LOAngularDimensionGetAngle ( LOAngularDimensionRef  dimension,
double *  angle 
)

Gets the angular dimension's angle. The angle is represented in radians.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]angleThe dimension angle.
Returns
LO_RESULT LOAngularDimensionGetArcCenterPoint ( LOAngularDimensionRef  dimension,
LOPoint2D point 
)

Gets the page location for the dimension arc center point.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]pointThe position of the dimension arc center point.
Returns
LO_RESULT LOAngularDimensionGetEndConnectionPoint ( LOAngularDimensionRef  dimension,
LOPoint2D point 
)

Gets the page location for the second connection.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]pointThe position of the second control point.
Returns
LO_RESULT LOAngularDimensionGetEndExtentPoint ( LOAngularDimensionRef  dimension,
LOPoint2D point 
)

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

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]pointThe position of the end of the dimension line.
Returns
LO_RESULT LOAngularDimensionGetEndOffsetPoint ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]pointThe position of the end of the dimension line.
Returns
LO_RESULT LOAngularDimensionGetExplodedEntities ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]entity_listThe entity list object to add the new entities to.
Returns
LO_RESULT LOAngularDimensionGetLeaderLineType ( LOAngularDimensionRef  dimension,
LOAngularDimensionLeaderLineType leader_line_type 
)

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

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]leader_line_typeThe leader line type.
Returns
LO_RESULT LOAngularDimensionGetRadius ( LOAngularDimensionRef  dimension,
double *  radius 
)

Gets the angular dimension's radius. This is the distance from the arc center point to the dimension line.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]radiusThe dimension radius.
Returns
LO_RESULT LOAngularDimensionGetStartConnectionPoint ( LOAngularDimensionRef  dimension,
LOPoint2D point 
)

Gets the page location for the first connection.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]pointThe position of the first connection point.
Returns
LO_RESULT LOAngularDimensionGetStartExtentPoint ( LOAngularDimensionRef  dimension,
LOPoint2D point 
)

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

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]pointThe position of the start of the dimension line.
Returns
LO_RESULT LOAngularDimensionGetStartOffsetPoint ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]pointThe position of the start of the extension line.
Returns
LO_RESULT LOAngularDimensionGetUsesCustomText ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[out]use_custom_textWhether the dimension uses custom text.
Returns
LO_RESULT LOAngularDimensionRelease ( LOAngularDimensionRef dimension)

Releases an angular dimension object. The object will be invalidated if releasing the last reference.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
Returns
LO_RESULT LOAngularDimensionSetDimensionText ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]textThe formatted text object.
Returns
LO_RESULT LOAngularDimensionSetEndConnectionPoint ( LOAngularDimensionRef  dimension,
const LOPoint2D point 
)

Sets the page location for the second connection.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]pointThe position for the second control point.
Returns
LO_RESULT LOAngularDimensionSetEndExtentPoint ( LOAngularDimensionRef  dimension,
const 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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]pointThe position of the end of the dimension line.
Returns
LO_RESULT LOAngularDimensionSetEndOffsetLength ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]lengthThe length the offset to the extension line should be.
Returns
LO_RESULT LOAngularDimensionSetLeaderLineType ( LOAngularDimensionRef  dimension,
LOAngularDimensionLeaderLineType  leader_line_type 
)

Sets the type of leader line the angular 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 LOAngularDimensionLeaderLineType_Hidden will not move the dimension text.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]leader_line_typeThe leader line type.
Returns
LO_RESULT LOAngularDimensionSetRadius ( LOAngularDimensionRef  dimension,
double  radius 
)

Sets the angular dimension's radius. This is the distance from the arc center point to the dimension line.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]radiusThe dimension radius.
Returns
LO_RESULT LOAngularDimensionSetStartConnectionPoint ( LOAngularDimensionRef  dimension,
const LOPoint2D point 
)

Sets the page location for the first connection.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]pointThe position for the first connection point.
Returns
LO_RESULT LOAngularDimensionSetStartExtentPoint ( LOAngularDimensionRef  dimension,
const 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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]pointThe position of the start of the dimension line.
Returns
LO_RESULT LOAngularDimensionSetStartOffsetLength ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]lengthThe length the offset to the extension line should be.
Returns
LO_RESULT LOAngularDimensionSetUsesCustomText ( LOAngularDimensionRef  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.

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
[in]use_custom_textWhether or not the dimension should use custom text.
Returns
LO_EXPORT LOEntityRef LOAngularDimensionToEntity ( LOAngularDimensionRef  dimension)

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

Since
LayOut 2017, API 2.0
Parameters
[in]dimensionThe angular dimension object.
Returns
  • The converted LOEntityRef if dimension is a valid object
  • If not, the returned reference will be invalid