Element Type Functions
- Last UpdatedNov 27, 2023
- 6 minute read
This chapter describes functions to get element type.
|
element_is_contour(elementHandle) |
|||
|
The function checks if an element is a contour. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_view(elementHandle) |
|||
|
The function checks if an element is a view. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_subpicture(elementHandle) |
|||
|
The function checks if an element is a subpicture. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_subview(elementHandle) |
|||
|
The function checks if an element is a subview. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_component(elementHandle) |
|||
|
The function checks if an element is a component. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_text(elementHandle) |
|||
|
The function checks if an element is a text. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_symbol(elementHandle) |
|||
|
The function checks if an element is a symbol. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_note(elementHandle) |
|||
|
The function checks if an element is a note component. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_posno(elementHandle) |
|||
|
The function checks if an element is a position number component. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_dimension(elementHandle) |
|||
|
The function checks if an element is a dimension component. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_hatch(elementHandle) |
|||
|
The function checks if an element is a hatch component. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
Example: |
|||
|
# Example: kcs_ex_draft30.py |
|||
|
element_is_nesting(elementHandle) |
|||
|
The function checks if an subpicture is a nesting subview or component which belongs to it. |
|||
|
Input Parameters: |
|||
|
elementHandle |
ElementHandle |
Handle to the component or subview. |
|
|
Returned value: |
|||
|
[0] |
Integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_burning_sketch(elementHandle) |
|||
|
The function checks if an subpicture is a burning sketch subview or component which belongs to it. |
|||
|
Input Parameters: |
|||
|
elementHandle |
ElementHandle |
Handle to the component or subview. |
|
|
Returned value: |
|||
|
[0] |
Integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
element_is_detail_sketch (elementHandle) |
|||
|
The function checks if an subpicture is a detail sketch subview or component which belongs to it. |
|||
|
Input Parameters: |
|||
|
elementHandle |
ElementHandle |
Handle to the component or subview. |
|
|
Returned value: |
|||
|
[0] |
Integer |
1 if element matches type, otherwise 0 |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
kcs_NotFound |
Element not found. |
||
|
Example: |
|||
|
# Example: kcs_ex_draft30.py |
|||
|
element_is_bodyplan_view (ViewPtr) |
|||
|
This function checks whether the current picture is a BodyplanView. |
|||
|
Input parameters |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a BodyplanView 1==If the model is a BodyplanView |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_curpanel_view (ViewPtr) |
|||
|
This function checks whether the current picture is a CurpanelView. |
|||
|
Input parameters |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a CurpanelView 1==If the model is a CurpanelView |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_detail_view (ViewPtr) |
|||
|
This function checks whether the current picture is a Detail View. |
|||
|
Input parameters |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a Detail View 1==If the model is a Detail View |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_devpla_view (ViewPtr) |
|||
|
This function checks whether the current picture is a DevplaView. |
|||
|
Input parameters: |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a DevplaView 1==If the model is a DevplaView |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_devsti_view (ViewPtr) |
|||
|
This function checks whether the current picture is a DevstiView. |
|||
|
Input parameters: |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a DevstiView 1==If the model is a DevstiView |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_general_view (ViewPtr) |
|||
|
This function checks whether the current picture is a General View. |
|||
|
Input parameters: |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a General View 1==If the model is a General View |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_shellx_view (ViewPtr) |
|||
|
This function checks whether the current picture is a ShellxView. |
|||
|
Input parameters: |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a ShellxView 1==If the model is a ShellxView |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_symbolic_view (ViewPtr) |
|||
|
This function checks whether the current picture is a Symbolic View. |
|||
|
Input parameters: |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a Symbolic View 1==If the model is a Symbolic View |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_templ_view (ViewPtr) |
|||
|
This function checks whether the current picture is a TemplView. |
|||
|
Input parameters: |
|||
|
ViewPtr |
Integer |
Handle to the view |
|
|
Returned value: |
|||
|
[0] |
Integer |
0==If the model is not a TemplView 1==If the model is a TemplView |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid arguments list. |
||
|
kcs_Value_Error |
Invalid parameter value. |
||
|
kcs_DrawingNotCurrent |
Active drawing not set. |
||
|
kcs_GeneralError |
List of result can't be created for some internal reason. |
||
|
element_is_depersisted(elementHandle) |
|||
|
The function checks if given element is de-persisted. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element. |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matches type, otherwise 0. |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||
|
element_is_label(elementHandle) |
|||
|
The function checks if an element is a label component. |
|||
|
Input Parameters: |
|||
|
elementHandle |
KcsElementHandle |
Handle to the element. |
|
|
Returned value: |
|||
|
[0] |
integer |
1 if element matched type, otherwise 0. |
|
|
Exceptions: |
|||
|
kcs_ArgumentError |
Invalid parameter type. |
||
|
kcs_HandleInvalid |
Invalid handle. |
||
|
kcs_DrawingNotCurrent |
No drawing was current. |
||