ksel#

Query.ksel(k)#

Returns selection status of a keypoint.

Returns a SelectionStatus object with values:

1 - SELECTED 0 - UNDEFINED -1 - UNSELECTED

Parameters:
kint

Keypoint number

Returns:
mapdl.ansys.core.inline_functions.SelectionStatus

Status of keypoint

Return type:

SelectionStatus

Examples

Here we create a single keypoint and interrogate its selection status.

>>> from ansys.mapdl.core import launch_mapdl
>>> mapdl = launch_mapdl()
>>> mapdl.prep7()
>>> k1 = mapdl.k(1, 0, 0, 0)
>>> k1
1

We can use Query.ksel to interrogate the selection status of the node. The response is an enum.IntEnum object. If you query a node that does not exist, it will return a status SelectionStatus.UNDEFINED.

>>> q = mapdl.queries
>>> q.ksel(k1)
<SelectionStatus.SELECTED: 1>
>>> mapdl.ksel('NONE')
>>> q.ksel(k1)
<SelectionStatus.UNSELECTED: -1>
>>> q.ksel(0)
<SelectionStatus.UNDEFINED: 0>