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
Functions
connectionpoint.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.

## Functions
LO_RESULT | LOConnectionPointCreate (LOConnectionPointRef *connection_point, LOEntityRef entity, const LOPoint2D *point, double aperture)
| Creates a new connection point object for the given entity at the given 2D point. More...
LO_RESULT | LOConnectionPointCreateFromPoint3D (LOConnectionPointRef *connection_point, LOSketchUpModelRef model, const LOPoint3D *point3d)
| Creates a new connection point object for the given SketchUp model entity at the given 3D point in model space. Note that connection points created via this function will have no persistent ID assigned to them, resulting in a connection point that does not update when geometry is modified. More...
LO_RESULT | LOConnectionPointCreateFromPID (LOConnectionPointRef *connection_point, LOSketchUpModelRef model, const LOPoint3D *point3d, const char *persistent_id)
| Creates a new connection point object for the given SketchUp model entity at the given 3D point in model space. Note that connection points created via this function have a persistent ID assigned to them, resulting in a connection point that updates when the geometry is modified. More...
LO_RESULT | LOConnectionPointRelease (LOConnectionPointRef *connection_point)
| Releases a connection point object. The object will be invalidated if releasing the last reference. More...

## Function Documentation

LO_RESULT LOConnectionPointCreate | ( | LOConnectionPointRef * | connection_point,
|  | LOEntityRef | entity,
|  | const LOPoint2D * | point,
|  | double | aperture
| ) |  |

Creates a new connection point object for the given entity at the given 2D point.

Parameters

  [out] | connection_point | The connection point object.
  [in] | entity | The entity object.
  [in] | point | The position of the connection point.
  [in] | aperture | The search radius to use when looking for geometry to connect to.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if connection_point is NULL
  - SU_ERROR_OVERWRITE_VALID if *connection_point already refers to a valid object
  - SU_ERROR_INVALID_INPUT if entity does not refer to a valid object
  - SU_ERROR_OUT_OF_RANGE if aperture is less than or equal to 0
  - SU_ERROR_NULL_POINTER_INPUT if point is NULL
  - SU_ERROR_GENERIC if the entity is not in a document
  - SU_ERROR_NO_DATA if no connection point could be made

LO_RESULT LOConnectionPointCreateFromPID | ( | LOConnectionPointRef * | connection_point,
|  | LOSketchUpModelRef | model,
|  | const LOPoint3D * | point3d,
|  | const char * | persistent_id
| ) |  |

Creates a new connection point object for the given SketchUp model entity at the given 3D point in model space. Note that connection points created via this function have a persistent ID assigned to them, resulting in a connection point that updates when the geometry is modified.

Note
  Starting in LayOut 2020.1, API 5.1, SU_ERROR_NO_DATA will be returned if persistent_id isn't valid for the given model.

Since
  LO 2017, API 2.0

Parameters

  [out] | connection_point | The connection point object.
  [in] | model | The SketchUp model object.
  [in] | point3d | The 3D position of the connection point in model.
  [in] | persistent_id | The PID of the entity.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if connection_point is NULL
  - SU_ERROR_OVERWRITE_VALID if *connection_point already refers to a valid object
  - SU_ERROR_INVALID_INPUT if model does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if point3d or persistent_id is NULL
  - SU_ERROR_GENERIC if the model is not in a document
  - SU_ERROR_NO_DATA if persistent_id does not refer to a valid path

LO_RESULT LOConnectionPointCreateFromPoint3D | ( | LOConnectionPointRef * | connection_point,
|  | LOSketchUpModelRef | model,
|  | const LOPoint3D * | point3d
| ) |  |

Creates a new connection point object for the given SketchUp model entity at the given 3D point in model space. Note that connection points created via this function will have no persistent ID assigned to them, resulting in a connection point that does not update when geometry is modified.

Parameters

  [out] | connection_point | The connection point object.
  [in] | model | The SketchUp model object.
  [in] | point3d | The 3D position of the connection point in model space.

Returns
  - SU_ERROR_NONE on success
  - SU_ERROR_NULL_POINTER_OUTPUT if connection_point is NULL
  - SU_ERROR_OVERWRITE_VALID if *connection_point already refers to a valid object
  - SU_ERROR_INVALID_INPUT if model does not refer to a valid object
  - SU_ERROR_NULL_POINTER_INPUT if point3d is NULL
  - SU_ERROR_GENERIC if the model is not in a document

LO_RESULT LOConnectionPointRelease | ( | LOConnectionPointRef * | connection_point | ) |

Releases a connection point object. The object will be invalidated if releasing the last reference.

Parameters

  [in] | connection_point | The connection point object.

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