SketchUp C API

- Main Page
- Related Pages
- Data Structures
- Files

- Data Structures
- Data Structure Index
- Class Hierarchy
- Data Fields

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Related Functions
SUAxesRef Struct Reference

An axes entity reference. More...

`#include <SketchUpAPI/model/axes.h>`

Inherits SUEntityRef.

## Related Functions
(Note that these are not member functions.)
SUEntityRef | SUAxesToEntity (SUAxesRef axes)
| Converts from an SUAxesRef to an SUEntityRef. This is essentially an upcast operation. More...
SUAxesRef | SUAxesFromEntity (SUEntityRef entity)
| Converts from an SUEntityRef to an SUAxesRef. This is essentially a downcast operation so the given SUEntityRef must be convertible to an SUAxesRef. More...
SUDrawingElementRef | SUAxesToDrawingElement (SUAxesRef axes)
| Converts from an SUAxesRef to an SUDrawingElementRef. This is essentially an upcast operation. More...
SUAxesRef | SUAxesFromDrawingElement (SUDrawingElementRef drawing_elem)
| Converts from an SUDrawingElementRef to an SUAxesRef. This is essentially a downcast operation so the given element must be convertible to an SUAxesRef. More...
enum SUResult | SUAxesCreate (SUAxesRef *axes)
| Creates a default constructed axes object. The axes object must be subsequently deallocated with SUAxesRelease() unless it is associated with a parent object. More...
enum SUResult | SUAxesCreateCustom (SUAxesRef *axes, const struct SUPoint3D *origin, const struct SUVector3D *xaxis, const struct SUVector3D *yaxis, const struct SUVector3D *zaxis)
| Creates an axes object. The axes object must be subsequently deallocated with SUAxesRelease() unless it is associated with a parent object. More...
enum SUResult | SUAxesRelease (SUAxesRef *axes)
| Releases aa axes object. The axes object must have been created with SUAxesCreate() and not subsequently associated with a parent object (e.g. SUEntitiesRef). More...
enum SUResult | SUAxesGetOrigin (SUAxesRef axes, struct SUPoint3D *origin)
| Retrieves the origin point value, not a reference. More...
enum SUResult | SUAxesSetOrigin (SUAxesRef axes, const struct SUPoint3D *origin)
| Sets the origin point value for the provided axes. More...
enum SUResult | SUAxesGetXAxis (SUAxesRef axes, struct SUVector3D *axis)
| Retrieves the 1st axis vector value, not a reference. More...
enum SUResult | SUAxesGetYAxis (SUAxesRef axes, struct SUVector3D *axis)
| Retrieves the 2nd axis vector value, not a reference. More...
enum SUResult | SUAxesGetZAxis (SUAxesRef axes, struct SUVector3D *axis)
| Retrieves the 3rd axis vector value, not a reference. More...
enum SUResult | SUAxesSetAxesVecs (SUAxesRef axes, const struct SUVector3D *xaxis, const struct SUVector3D *yaxis, const struct SUVector3D *zaxis)
| Sets the axes' vectors. Fails if vectors don't make an orthogonal axes. More...
enum SUResult | SUAxesGetTransform (SUAxesRef axes, struct SUTransformation *transform)
| Retrieves a copy of the transformation. More...
enum SUResult | SUAxesGetPlane (SUAxesRef axes, struct SUPlane3D *plane)
| Retrieves a copy of the plane. More...
Related Functions inherited from SUEntityRef
enum SURefType | SUEntityGetType (SUEntityRef entity)
| Returns the concrete type of the given entity. More...
enum SUResult | SUEntityGetID (SUEntityRef entity, int32_t *entity_id)
| Retrieves the id of the entity. More...
enum SUResult | SUEntityGetPersistentID (SUEntityRef entity, int64_t *entity_pid)
| Retrieves the persistent id of the entity. More...
enum SUResult | SUEntityGetNumAttributeDictionaries (SUEntityRef entity, size_t *count)
| Retrieves the number of attribute dictionaries of an entity. More...
enum SUResult | SUEntityGetAttributeDictionaries (SUEntityRef entity, size_t len, SUAttributeDictionaryRef dictionaries[], size_t *count)
| Retrieves the attribute dictionaries of an entity. More...
enum SUResult | SUEntityAddAttributeDictionary (SUEntityRef entity, SUAttributeDictionaryRef dictionary)
| Adds the attribute dictionary to an entity. The given dictionary object must not belong to another entity. In other words, each dictionary should be added to one entity only. More...
enum SUResult | SUEntityGetAttributeDictionary (SUEntityRef entity, const char *name, SUAttributeDictionaryRef *dictionary)
| Retrieves the attribute dictionary of an entity that has the given name. More...
enum SUResult | SUEntityGetModel (SUEntityRef entity, SUModelRef *model)
| Retrieves the model object associated with the entity. More...
enum SUResult | SUEntityGetParentEntities (SUEntityRef entity, SUEntitiesRef *entities)
| Retrieves the entities object which contains the entity. More...

## Detailed Description

An axes entity reference.

Since
  SketchUp 2016, API 4.0

## Friends And Related Function Documentation

enum SUResult SUAxesCreate | ( | SUAxesRef * | axes | ) |
| related

Creates a default constructed axes object. The axes object must be subsequently deallocated with SUAxesRelease() unless it is associated with a parent object.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if axes is NULL
  - SU_ERROR_OVERWRITE_VALID if axes references a valid object

enum SUResult SUAxesCreateCustom | ( | SUAxesRef * | axes,
|  | const struct SUPoint3D * | origin,
|  | const struct SUVector3D * | xaxis,
|  | const struct SUVector3D * | yaxis,
|  | const struct SUVector3D * | zaxis
| ) |  |
| related

Creates an axes object. The axes object must be subsequently deallocated with SUAxesRelease() unless it is associated with a parent object.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [in] | origin | The origin of the new axes.
  [in] | xaxis | The 1st axis for the custom 3D axes.
  [in] | yaxis | The 2nd axis for the custom 3D axes.
  [in] | zaxis | The 3rd axis for the custom 3D axes.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if axes is NULL
  - SU_ERROR_OVERWRITE_VALID if axes references a valid object
  - SU_ERROR_NULL_POINTER_INPUT if any of the input pointers (origin, xaxis yaxis, and zaxis) are NULL
  - SU_ERROR_GENERIC if the three vectors don't make an orthogonal axes

SUAxesRef SUAxesFromDrawingElement | ( | SUDrawingElementRef | drawing_elem | ) |
| related

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

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | drawing_elem | The given element reference.

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

SUAxesRef SUAxesFromEntity | ( | SUEntityRef | entity | ) |
| related

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

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | entity | The entity object.

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

enum SUResult SUAxesGetOrigin | ( | SUAxesRef | axes,
|  | struct SUPoint3D * | origin
| ) |  |
| related

Retrieves the origin point value, not a reference.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [out] | origin | Pointer to a SUPoint3D struct for returning the origin.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if origin is NULL

enum SUResult SUAxesGetPlane | ( | SUAxesRef | axes,
|  | struct SUPlane3D * | plane
| ) |  |
| related

Retrieves a copy of the plane.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [out] | plane | Pointer to a SUPlane3D struct for getting the plane data.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if plane is NULL

enum SUResult SUAxesGetTransform | ( | SUAxesRef | axes,
|  | struct SUTransformation * | transform
| ) |  |
| related

Retrieves a copy of the transformation.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [out] | transform | Pointer to a SUTransformation struct for getting the transformation data.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if transform is NULL

enum SUResult SUAxesGetXAxis | ( | SUAxesRef | axes,
|  | struct SUVector3D * | axis
| ) |  |
| related

Retrieves the 1st axis vector value, not a reference.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [out] | axis | Pointer to a SUVector3D struct for getting the 1st axis.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if axis is NULL

enum SUResult SUAxesGetYAxis | ( | SUAxesRef | axes,
|  | struct SUVector3D * | axis
| ) |  |
| related

Retrieves the 2nd axis vector value, not a reference.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [out] | axis | Pointer to a SUVector3D struct for getting the 2nd axis.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if axis is NULL

enum SUResult SUAxesGetZAxis | ( | SUAxesRef | axes,
|  | struct SUVector3D * | axis
| ) |  |
| related

Retrieves the 3rd axis vector value, not a reference.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [out] | axis | Pointer to a SUVector3D struct for getting the 3rd axis.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_OUTPUT if axis is NULL

enum SUResult SUAxesRelease | ( | SUAxesRef * | axes | ) |
| related

Releases aa axes object. The axes object must have been created with SUAxesCreate() and not subsequently associated with a parent object (e.g. SUEntitiesRef).

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_INPUT if axes is NULL
  - SU_ERROR_INVALID_INPUT if axes does not reference a valid object

enum SUResult SUAxesSetAxesVecs | ( | SUAxesRef | axes,
|  | const struct SUVector3D * | xaxis,
|  | const struct SUVector3D * | yaxis,
|  | const struct SUVector3D * | zaxis
| ) |  |
| related

Sets the axes' vectors. Fails if vectors don't make an orthogonal axes.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [in] | xaxis | Pointer to a SUVector3D struct for setting the 1st axis.
  [in] | yaxis | Pointer to a SUVector3D struct for setting the 2nd axis.
  [in] | zaxis | Pointer to a SUVector3D struct for setting the 3rd axis.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_INPUT if xaxis, yaxis, or zaxis is NULL
  - SU_ERROR_GENERIC if the three vectors don't make an orthogonal axes

enum SUResult SUAxesSetOrigin | ( | SUAxesRef | axes,
|  | const struct SUPoint3D * | origin
| ) |  |
| related

Sets the origin point value for the provided axes.

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.
  [in] | origin | Pointer to a SUPoint3D struct for setting the origin.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_INVALID_INPUT if axes is not a valid object
  - SU_ERROR_NULL_POINTER_INPUT if origin is NULL

SUDrawingElementRef SUAxesToDrawingElement | ( | SUAxesRef | axes | ) |
| related

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

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The given axes reference.

Returns
  - The converted SUEntityRef if axes is a valid axes
  - If not, the returned reference will be invalid

SUEntityRef SUAxesToEntity | ( | SUAxesRef | axes | ) |
| related

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

Since
  SketchUp 2016, API 4.0

Parameters

  [in] | axes | The axes object.

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

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

- SketchUpAPI/model/defs.h
- SketchUpAPI/model/axes.h