SE_shape_replace_part

Replaces a specified part of a shape

Usage syntax

LONG SE_shape_replace_part (const SE_SHAPE src_shape, LONG part_num, SE_SHAPE tgt_shape);

Parameters
src_shape A handle to an active shape object containing the new parts to use
part_num The number of the part to replace in the target shape
tgt_shape A handle to an active shape object, returned as the target shape after replacing the specified part with the source shape
Description

SE_shape_replace_part replaces a specified part of the target shape with a new part. The new part is supplied in the form of the source shape, and replaces the part in the target shape defined by part_num. The part identified by part_num must exist in the target shape. If the target shape has two or more parts and the source and target shapes are not of the same type, the operation fails. If the source shape has multiple parts, the parts of the source shape replace the part of the target beginning with the part number specified in part_num. The specified part is deleted, and the parts of the source shape are inserted into the target shape. Target shape parts that fall after part_num are shifted for the new parts. For example, if the source shape and target shape both have three parts and the target part number is 2, the target shape has five parts (original part 1, parts 2 through 4 which were the parts from the source shape, and part 5 which was the old part 2 of the target shape).

Returns

SE_SUCCESS
SE_CAD_EXISTS

SE_INCOMPATIBLE_COORDREFS

SE_INCOMPATIBLE_SHAPES

SE_INVALID_PARTNUM

SE_INVALID_SHAPE

SE_INVALID_SHAPE_OBJECT

SE_OUT_OF_CLMEM

SE_READ_ONLY_SHAPE

Notes

∙  If you pass a shape returned from SE_stable_search or SE_stable_get_shape to tgt_shape, the SE_READ_ONLY_SHAPE error is returned.

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