Functions | |
void | Delete_By_Key (HC_KEY key) |
void Delete_By_Key | ( | HC_KEY | key | ) |
Throws away a segment identified by key rather than by name, or throws away a particular geometry item.
key | - Key returned by a previously called routine. |
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.