esel#
- Query.esel(e)#
Returns selection status of an element.
Returns a
SelectionStatus
object with values:1 - SELECTED 0 - UNDEFINED -1 - UNSELECTED
- Parameters:
- e
int
Element number
- e
- Returns:
mapdl.ansys.core.inline_functions.SelectionStatus
Status of element
- Return type:
SelectionStatus
Examples
Here we create a single element and interrogate its selection status.
>>> from ansys.mapdl.core import launch_mapdl >>> mapdl = launch_mapdl() >>> mapdl.prep7() >>> mapdl.et(1, 'SHELL181') >>> n1 = mapdl.n(1, 0, 0, 0) >>> n2 = mapdl.n(2, 1, 0, 0) >>> n3 = mapdl.n(3, 1, 1, 1) >>> e1 = mapdl.e(n1, n2, n3) >>> e1 1
We can use
Query.esel
to interrogate the selection status of the element. The response is anenum.IntEnum
object. If you query an element that does not exist, it will return a statusSelectionStatus.UNDEFINED
.>>> q = mapdl.queries >>> q.esel(e1) <SelectionStatus.SELECTED: 1> >>> mapdl.esel('NONE') >>> q.esel(e1) <SelectionStatus.UNSELECTED: -1> >>> q.esel(0) <SelectionStatus.UNDEFINED: 0>