Move_By_Key

Functions

void Move_By_Key (HC_KEY key, const char *newowner)
 Moves a single geometric primitive or segment from one segment to another. More...
 
void Move_By_Key_By_Key (HC_KEY key, HC_KEY newowner)
 Moves a single geometric primitive or segment from one segment to another. Locally renumbered keys require the parent segment to be open in order to resolve them. More...
 

Detailed Description

Function Documentation

◆ Move_By_Key()

void Move_By_Key ( HC_KEY  key,
const char *  newowner 
)

Moves a single geometric primitive or segment from one segment to another.

Parameters
key- Key returned by a previous call to one of the "Insert" or "Open" routines.
newowner- Name of the segment which is to become the new container of the piece of geometry.

DETAILS

Oftentimes it's handy to be able to change the appearance of a single item on the screen, for example, to highlight the item after the user has selected it.
The usual way to do this is to put each item into a segment of its own, and then to change the attributes on the segment. If your "items" consist of single geometric primitive, an alternative is to use Move_By_Key() to pull the primitive out of a big group of them all in the same segment, and put it in a segment of its own, which presumably will have a different color attribute or something.

You can also move one segment from one parent to another using this function; however, include segments cannot be moved.

NOTES

Starting with version 13.0, include segments may be moved with this function. The alternative was to break the include link to the old segment and reinsert the link in the new segment.

RESTRICTIONS

Move_By_Key() cannot be applied to string cursor keys.

See also
Rename_Segment, Delete_By_Key, Show_Selection_Element.

◆ Move_By_Key_By_Key()

void Move_By_Key_By_Key ( HC_KEY  key,
HC_KEY  newowner 
)

Moves a single geometric primitive or segment from one segment to another. Locally renumbered keys require the parent segment to be open in order to resolve them.

Parameters
key- Key returned by a previous call to one of the "Insert" or "Open" routines.
newowner- Key of the segment which is to become the new container of the piece of geometry.

DETAILS

No additional details. See Move_By_Key().