Highlighting Functions
- Last UpdatedNov 27, 2023
- 2 minute read
This section describes functions to highlight certain geometric entities in the current drawing. All such functions return a handle to the highlighted entity, used when turning off the highlighting by the function highlight_off.
|
Example: |
||
|---|---|---|
|
hl_handle = arc_highlight(arc) |
||
|
arc_highlight(Object) |
||
|
The function highlights a circular arc. |
||
|
Input Parameters: |
||
|
Object |
Arc2D |
The arc definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
circle_highlight(Object) |
||
|
The function highlights a circle. |
||
|
Input Parameters: |
||
|
Object |
Circle2D |
The circle definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
conic_highlight(Object) |
||
|
The function highlights a conic segment. |
||
|
Input Parameters: |
||
|
Object |
Conic2D |
The conic segment definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
contour_highlight(Object) |
||
|
The function highlights a contour. |
||
|
Input Parameters: |
||
|
Object |
Contour2D |
The contour definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
ellipse_highlight(Object) |
||
|
The function highlights an ellipse. |
||
|
Input Parameters: |
||
|
Object |
Ellipse2D |
The ellipse definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
line_highlight(Object) |
||
|
The function highlights a restricted line. |
||
|
Input Parameters: |
||
|
Object |
Rline2D |
The line definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
point_highlight(Object,<Type>) |
||
|
The function highlights a point. |
||
|
Input Parameters: |
||
|
Object |
Point2D |
The point definition |
|
Type |
=1 |
A cross will be drawn that stays the same size regardless of zoom. |
|
Else |
A circle will be drawn as before. |
|
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
rectangle_highlight(Object) |
||
|
The function highlights a rectangle. |
||
|
Input Parameters: |
||
|
Object |
Rectangle2D |
The rectangle definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
kcs_ValueError |
|
|
spline_highlight(Object) |
||
|
The function highlights a spline. |
||
|
Input Parameters: |
||
|
Object |
Polygon2D |
The spline definition |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_ValueError |
Invalid parameter value |
|
|
element_highlight(Handle) or element_highlight([Handles]) |
||
|
The function highlights an arbitrary entity/entities given by a handle/list of handles. |
||
|
Input Parameters: |
||
|
Handle |
KcsElementHandle |
Single handle or a list of handles. |
|
Returned value: |
||
|
[0] |
KcsElementHandle |
Handle to the highlighted entity/entities. |
|
Exceptions: |
||
|
kcs_DrawingNotCurrent |
No drawing was current |
|
|
kcs_HandleInvalid |
Invalid handle to given entity |
|
|
highlight_off(Handle) |
||
|
The function turns off a given highlighting. |
||
|
Input Parameters: |
||
|
Handle |
KcsElementHandle |
Handle to a highlighted entity (no validity check. |
|
If zero is given, all highlighted entities are turned off. |
||
|
Returned value: |
||
|
None |
||
|
Exceptions: |
||
|
None |
||
|
Example: |
||
|
# Example: kcs_ex_draft13.py |
||