select_parts#

Parts.select_parts(p_list: List[str | int | ENS_PART] | None = None, rec_flag: bool | None = True) List[ENS_PART] | None#

Select the parts string, or int, or ensight.objs.ENS_PART, or list and record the selection (by default) honoring the EnSight preference to record command language by part id or by name. It creates a list of part objects and selects the parts, and records the selection by default.

Parameters:
p_list: list

The list of part objects to compute the forces on. It can either be a list of names a list of IDs (integers or strings) or directly a list of ENS_PART objects

rec_flag: bool

True if the selection needs to be recorded

Returns:
list

A list of part objects selected or None if error.

NOTE: If you do not want a measured part in your

selection, then don’t include it in the list e.g. if core.PARTS[0].PARTTYPE == ensight.objs.enums.PART_DISCRETE_PARTICLE == 3 then it is a measured part