HC_Delete_By_Key
-
void
HC_Delete_By_Key(Key key) - void HC_Delete_By_Key(Key key)
Throws away a segment identified by key rather than by name, or throws away a particular geometry item.
If the given key refers to a segment - if it was returned from Open_Segment() or Create_Segment() - then, as with Delete_Segment() , that segment and all its subsegments are deleted from the segment tree. This is useful when the segment was originally created without a name (i.e., it was a “no-name” segment), or when it’s easier to keep track of the segment by key rather than name.
If the given key refers to a geometric primitive, such as a line or a polygon, that single primitive is deleted from the database and (at the next Update) from the screen. For comparison, Flush_Contents() deletes all the primitives from the specified segment. Delete_Segment() deletes the primitives and the segment structure itself.
Finally, if the given key was returned from Include_Segment() or Style_Segment() , that segment cross-reference is removed from the database - the “include” or “style” is no longer performed. The segments themselves remain unaffected.
NOTE
If the item is currently open ( Open_Segment() or Open_Geometry() ) an error will be reported and the deletion will fail.
HC_Flush_Contents, HC_Delete_Segment, HC_Open_Segment, HC_Open_Geometry, HC_Create_Segment, HC_Include_Segment, HC_Style_Segment.Parameters
key: Key returned by a previously called routine.