lsel#

Mapdl.lsel(type_='', item='', comp='', vmin='', vmax='', vinc='', kswp='', **kwargs)[source]#

Selects a subset of lines.

APDL Command: LSEL

Note

Starting with PyMAPDL v0.66.0, you can use “P” as a second argument to select entities interactively. A window pops up allowing you to select, unselect, add or reselect entities depending on the first argument type_. An array with the ids of new selection is returned when the window is closed.

You can switch between selecting and unselecting pressing the keyboard key U.

Parameters:
type_

Label identifying the type of select:

S

Select a new set (default).

R

Reselect a set from the current set.

A

Additionally select a set and extend the current set.

U

Unselect a set from the current set.

ALL

Restore the full set.

NONE

Unselect the full set.

INVE

Invert the current set (selected becomes unselected and vice versa).

STAT

Display the current select status.

The following fields are used only with Type = S, R, A, or U:
Item

Label identifying data. Valid item labels are shown in the table below. Some items also require a component label. If Item = PICK (or simply “P”), graphical picking is enabled and all remaining command fields are ignored (valid only in the GUI). Defaults to LINE.

Comp

Component of the item (if required). Valid component labels are shown in the table below.

VMIN

Minimum value of item range. Ranges are line numbers, coordinate values, attribute numbers, etc., as appropriate for the item. If VMIN = 0.0, a tolerance of ±1.0E-6 is used, or ±0.005 x VMIN if VMIN = VMAX. A component name (as specified on the CM (p. 338) command) may also be substituted for VMIN (VMAX and VINC are ignored). If Item = MAT, TYPE, REAL, ESYS, or NDIV and if VMIN is positive, the absolute value of Item is compared against the range for selection; if VMIN is negative, the signed value of Item is compared. See the LLIST (p. 1011) command for a discussion of signed attributes.

VMAX

Maximum value of item range. VMAX defaults to VMIN.

VINC

Value increment within range. Used only with integer ranges (such as for line numbers). Defaults to 1. VINC cannot be negative.

KSWP

Specifies whether only lines are to be selected:

kswp=0

Select lines only.

kswp=1

Select lines, as well as keypoints, nodes, and elements associated with selected lines. Valid only with type="s".

Returns:
np.ndarray

Numpy array with the ids of the selected entities. For more information visit Postprocessing.

Notes

Selects lines based on values of a labeled item and component. For example, to select a new set of lines based on line numbers 1 through 7, use LSEL,S,LINE,,1,7. The subset is used when the ALL label is entered (or implied) on other commands, such as LLIST,ALL. Only data identified by line number are selected. Data are flagged as selected and unselected; no data are actually deleted from the database.

If Item = LCCA, the command selects only those lines that were created by concatenation. The KSWP field is processed, but the Comp, VMIN, VMAX, and VINC fields are ignored.

If Item = HPT, the command selects only those lines that contain hard points.

Item = RADIUS is only valid for lines that are circular arcs.

LSEL is valid in any processor.

For selections based on non-integer numbers (coordinates, results, etc.), items that are within the range VMIN -Toler and VMAX +Toler are selected. The default tolerance Toler is based on the relative values of VMIN and VMAX as follows:

If VMIN = VMAX, Toler = 0.005 x VMIN.

If VMIN = VMAX = 0.0, Toler = 1.0E-6.

If VMAX ≠ VMIN, Toler = 1.0E-8 x (VMAX - VMIN).

Use the SELTOL command to override this default and specify Toler explicitly.