SketchUp C API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SUDimensionRef Struct Reference

A dimension entity reference. More...

#include <SketchUpAPI/model/dimension.h>

Inherits SUDrawingElementRef.

Inherited by SUDimensionLinearRef, and SUDimensionRadialRef.

Related Functions

(Note that these are not member functions.)

SUEntityRef SUDimensionToEntity (SUDimensionRef dimension)
 Converts from an SUDimensionRef to an SUEntityRef. This is essentially an upcast operation. More...
 
SUDimensionRef SUDimensionFromEntity (SUEntityRef entity)
 Converts from an SUEntityRef to an SUDimensionRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUDimensionRef. More...
 
SUDrawingElementRef SUDimensionToDrawingElement (SUDimensionRef dimension)
 Converts from an SUDimensionRef to an SUDrawingElementRef. This is essentially an upcast operation. More...
 
SUDimensionRef SUDimensionFromDrawingElement (SUDrawingElementRef element)
 Converts from an SUDrawingElementRef to an SUDimensionRef. This is essentially a downcast operation so the given SUDrawingElementRef must be convertible to an SUDimensionRef. More...
 
enum SUResult SUDimensionGetType (SUDimensionRef dimension, enum SUDimensionType *type)
 Retrieves an enum value indicating the dimension type (linear or radial). More...
 
enum SUResult SUDimensionGetText (SUDimensionRef dimension, SUStringRef *text)
 Retrieves the text of a dimension object. More...
 
enum SUResult SUDimensionSetText (SUDimensionRef dimension, const char *text)
 Sets the text of a dimension object. More...
 
enum SUResult SUDimensionGetPlane (SUDimensionRef dimension, struct SUPlane3D *plane)
 Retrieves the plane of a dimension object. More...
 
enum SUResult SUDimensionGetText3D (SUDimensionRef dimension, bool *is_text_3d)
 Retrieves a boolean indicating if the dimension text is 3D. More...
 
enum SUResult SUDimensionSetText3D (SUDimensionRef dimension, bool is_text_3d)
 Sets a boolean indicating whether the dimension text is 3D. More...
 
enum SUResult SUDimensionGetArrowType (SUDimensionRef dimension, enum SUArrowType *type)
 Retrieves an enum value indicating the dimension's arrow type. More...
 
enum SUResult SUDimensionSetArrowType (SUDimensionRef dimension, enum SUArrowType type)
 Sets the dimension's arrow type. More...
 
enum SUResult SUDimensionGetFont (SUDimensionRef dimension, SUFontRef *font)
 Get the dimension's font reference. More...
 
enum SUResult SUDimensionSetFont (SUDimensionRef dimension, SUFontRef font)
 Sets the dimension's font from a font reference. More...
 

Detailed Description

A dimension entity reference.

Since
SketchUp 2017, API 5.0

Friends And Related Function Documentation

SUDimensionRef SUDimensionFromDrawingElement ( SUDrawingElementRef  element)
related

Converts from an SUDrawingElementRef to an SUDimensionRef. This is essentially a downcast operation so the given SUDrawingElementRef must be convertible to an SUDimensionRef.

Since
SketchUp 2017, API 5.0
Parameters
[in]elementThe given drawing element reference.
Returns
  • The converted SUDimensionRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
SUDimensionRef SUDimensionFromEntity ( SUEntityRef  entity)
related

Converts from an SUEntityRef to an SUDimensionRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUDimensionRef.

Since
SketchUp 2017, API 5.0
Parameters
[in]entityThe given entity reference.
Returns
  • The converted SUDimensionRef if the downcast operation succeeds
  • If not, the returned reference will be invalid
enum SUResult SUDimensionGetArrowType ( SUDimensionRef  dimension,
enum SUArrowType type 
)
related

Retrieves an enum value indicating the dimension's arrow type.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[out]typeThe arrow type enum value retrieved.
Returns
enum SUResult SUDimensionGetFont ( SUDimensionRef  dimension,
SUFontRef font 
)
related

Get the dimension's font reference.

Since
SketchUp 2019, API 7.0
Parameters
[in]dimensionThe dimension object.
[out]fontThe font retrieved.
Returns
enum SUResult SUDimensionGetPlane ( SUDimensionRef  dimension,
struct SUPlane3D plane 
)
related

Retrieves the plane of a dimension object.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[out]planeThe 3d plane retrieved.
Returns
enum SUResult SUDimensionGetText ( SUDimensionRef  dimension,
SUStringRef text 
)
related

Retrieves the text of a dimension object.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[out]textThe name retrieved.
Returns
enum SUResult SUDimensionGetText3D ( SUDimensionRef  dimension,
bool *  is_text_3d 
)
related

Retrieves a boolean indicating if the dimension text is 3D.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[out]is_text_3dThe flag value retrieved.
Returns
enum SUResult SUDimensionGetType ( SUDimensionRef  dimension,
enum SUDimensionType type 
)
related

Retrieves an enum value indicating the dimension type (linear or radial).

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[out]typeThe dimension type enum value retrieved.
Returns
enum SUResult SUDimensionSetArrowType ( SUDimensionRef  dimension,
enum SUArrowType  type 
)
related

Sets the dimension's arrow type.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[in]typeThe arrow type to be set.
Returns
enum SUResult SUDimensionSetFont ( SUDimensionRef  dimension,
SUFontRef  font 
)
related

Sets the dimension's font from a font reference.

Since
SketchUp 2019, API 7.0
Parameters
[in]dimensionThe dimension object.
[in]fontThe font to be set.
Returns
enum SUResult SUDimensionSetText ( SUDimensionRef  dimension,
const char *  text 
)
related

Sets the text of a dimension object.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[in]textThe text to be set. Assumed to be UTF-8 encoded.
Returns
enum SUResult SUDimensionSetText3D ( SUDimensionRef  dimension,
bool  is_text_3d 
)
related

Sets a boolean indicating whether the dimension text is 3D.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe dimension object.
[in]is_text_3dThe flag to be set.
Returns
SUDrawingElementRef SUDimensionToDrawingElement ( SUDimensionRef  dimension)
related

Converts from an SUDimensionRef to an SUDrawingElementRef. This is essentially an upcast operation.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe given dimension reference.
Returns
  • The converted SUDrawingElementRef if dimension is a valid object
  • If not, the returned reference will be invalid
SUEntityRef SUDimensionToEntity ( SUDimensionRef  dimension)
related

Converts from an SUDimensionRef to an SUEntityRef. This is essentially an upcast operation.

Since
SketchUp 2017, API 5.0
Parameters
[in]dimensionThe given dimension reference.
Returns
  • The converted SUEntityRef if dimension is a valid object
  • If not, the returned reference will be invalid

The documentation for this struct was generated from the following files: