SE_shape_change_path

Replaces a path in the source shape with a new path.

Usage syntax

LONG SE_shape_change_path (SE_SHAPE shape, SE_SDEPOINT *firstpt, SE_SDEPOINT *midpt, SE_SDEPOINT *lastpt, SE_SDEPOINT *pointlist, LONG num_pts);

Parameters
shape The source shape to change
firstpt An SE_SDEPOINT structure containing the path’s start-point coordinates
midpt An SE_SDEPOINT structure containing the coordinates of any point along the path. If there is no midpoint, set this value to NULL.
lastpt An SE_SDEPOINT structure containing the coordinate values of the endpoint of the path
pointlist The list of coordinates that will replace the path. May be NULL.
num_pts The number of points in the ‘pointlist’ array. May be zero.
Description

SE_shape_change_path replaces any specified sequence of points in the source shape with a new path, but retains its start and endpoints. The points supplied by ‘pointlist’ replace the points between the specified start and endpoints. If the ‘pointlist’ pointer is NULL or the ‘num_pts’ value is zero, no points are inserted between the start and endpoints, and any points that previously lay between them are eliminated.

The midpt parameter is important when working with area shapes. The midpoint identifies which section of the polygon to change. In the drawing below, the firstpt and lastpt are 5 and 7, while 6 is the midpt.

The z- and m-values of the SE_SDEPOINT structures are ignored unless the input shape has a z and/or a measures array.

 

The path 5-6-7 is removed. The pointlist was null, so no points were added.

Returns

SE_SUCCESS
SE_CAD_EXISTS

SE_COORD_OUT_OF_BOUNDS

SE_FAILURE

SE_INVALID_ENTITY_TYPE

SE_INVALID_PARAM_VALUE

SE_INVALID_POINTER

SE_INVALID_SHAPE_OBJECT

SE_OUT_OF_CLMEM

SE_PATH_NOT_FOUND

SE_READ_ONLY_SHAPE

SE_SHAPE_INTEGRITY_ERROR

Notes

•  If this function does not return successfully, the source shape is unchanged.

•  If you pass a shape returned from SE_stable_search or SE_stable_get_shape to ‘shape’, the SE_READ_ONLY_SHAPE error is returned. See ‘Shape table functions’ for more information.

•  If the source shape has a CAD entity, the SE_CAD_EXISTS error is returned.