:class:`NamedSelection` ======================= .. py:class:: ansys.geometry.core.designer.selection.NamedSelection(name: str, design: ansys.geometry.core.designer.design.Design, grpc_client: ansys.geometry.core.connection.client.GrpcClient, bodies: list[ansys.geometry.core.designer.body.Body] | None = None, faces: list[ansys.geometry.core.designer.face.Face] | None = None, edges: list[ansys.geometry.core.designer.edge.Edge] | None = None, beams: list[ansys.geometry.core.designer.beam.Beam] | None = None, design_points: list[ansys.geometry.core.designer.designpoint.DesignPoint] | None = None, components: list[ansys.geometry.core.designer.component.Component] | None = None, vertices: list[ansys.geometry.core.designer.vertex.Vertex] | None = None, design_curves: list[ansys.geometry.core.designer.designcurve.DesignCurve] | None = None, preexisting_id: str | None = None) Represents a single named selection within the design assembly. This class synchronizes to a design within a supporting Geometry service instance. A named selection organizes one or more design entities together for common actions against the entire group. :Parameters: **name** : :class:`python:str` User-defined name for the named selection. **design** : :obj:`Design` Design instance to which the named selection belongs. **grpc_client** : :obj:`GrpcClient` Active supporting Geometry service instance for design modeling. **bodies** : :class:`python:list`\[:obj:`Body`], default: :data:`python:None` All bodies to include in the named selection. **faces** : :class:`python:list`\[:obj:`Face`], default: :data:`python:None` All faces to include in the named selection. **edges** : :class:`python:list`\[:obj:`Edge`], default: :data:`python:None` All edges to include in the named selection. **beams** : :class:`python:list`\[:obj:`Beam`], default: :data:`python:None` All beams to include in the named selection. **design_points** : :class:`python:list`\[:obj:`DesignPoints`], default: :data:`python:None` All design points to include in the named selection. **components: list[Component], default: None** All components to include in the named selection. **vertices: list[Vertex], default: None** All vertices to include in the named selection. **design_curves** : :class:`python:list`\[:obj:`DesignCurve`], default: :data:`python:None` All design curves to include in the named selection. .. !! processed by numpydoc !! .. py:currentmodule:: NamedSelection Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~add_members` - Add members to the named selection. * - :py:attr:`~remove_members` - Remove members from the named selection. .. tab-item:: Properties .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~id` - ID of the named selection. * - :py:attr:`~name` - Name of the named selection. * - :py:attr:`~bodies` - All bodies in the named selection. * - :py:attr:`~faces` - All faces in the named selection. * - :py:attr:`~edges` - All edges in the named selection. * - :py:attr:`~beams` - All beams in the named selection. * - :py:attr:`~design_points` - All design points in the named selection. * - :py:attr:`~components` - All components in the named selection. * - :py:attr:`~vertices` - All vertices in the named selection. * - :py:attr:`~design_curves` - All design curves in the named selection. .. tab-item:: Special methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~__repr__` - Represent the ``NamedSelection`` as a string. Import detail ------------- .. code-block:: python from ansys.geometry.core.designer.selection import NamedSelection Property detail --------------- .. py:property:: id :type: str ID of the named selection. .. !! processed by numpydoc !! .. py:property:: name :type: str Name of the named selection. .. !! processed by numpydoc !! .. py:property:: bodies :type: list[ansys.geometry.core.designer.body.Body] All bodies in the named selection. .. !! processed by numpydoc !! .. py:property:: faces :type: list[ansys.geometry.core.designer.face.Face] All faces in the named selection. .. !! processed by numpydoc !! .. py:property:: edges :type: list[ansys.geometry.core.designer.edge.Edge] All edges in the named selection. .. !! processed by numpydoc !! .. py:property:: beams :type: list[ansys.geometry.core.designer.beam.Beam] All beams in the named selection. .. !! processed by numpydoc !! .. py:property:: design_points :type: list[ansys.geometry.core.designer.designpoint.DesignPoint] All design points in the named selection. .. !! processed by numpydoc !! .. py:property:: components :type: list[ansys.geometry.core.designer.component.Component] All components in the named selection. .. !! processed by numpydoc !! .. py:property:: vertices :type: list[ansys.geometry.core.designer.vertex.Vertex] All vertices in the named selection. .. !! processed by numpydoc !! .. py:property:: design_curves :type: list[ansys.geometry.core.designer.designcurve.DesignCurve] All design curves in the named selection. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: add_members(bodies: list[ansys.geometry.core.designer.body.Body] | None = None, faces: list[ansys.geometry.core.designer.face.Face] | None = None, edges: list[ansys.geometry.core.designer.edge.Edge] | None = None, beams: list[ansys.geometry.core.designer.beam.Beam] | None = None, design_points: list[ansys.geometry.core.designer.designpoint.DesignPoint] | None = None, components: list[ansys.geometry.core.designer.component.Component] | None = None, vertices: list[ansys.geometry.core.designer.vertex.Vertex] | None = None, design_curves: list[ansys.geometry.core.designer.designcurve.DesignCurve] | None = None) -> NamedSelection Add members to the named selection. :Parameters: **bodies** : :class:`python:list`\[:obj:`Body`], default: :data:`python:None` All bodies to add to the named selection. **faces** : :class:`python:list`\[:obj:`Face`], default: :data:`python:None` All faces to add to the named selection. **edges** : :class:`python:list`\[:obj:`Edge`], default: :data:`python:None` All edges to add to the named selection. **beams** : :class:`python:list`\[:obj:`Beam`], default: :data:`python:None` All beams to add to the named selection. **design_points** : :class:`python:list`\[:obj:`DesignPoints`], default: :data:`python:None` All design points to add to the named selection. **components: list[Component], default: None** All components to add to the named selection. **vertices: list[Vertex], default: None** All vertices to add to the named selection. **design_curves: list[DesignCurve], default: None** All design curves to add to the named selection. :Returns: :obj:`NamedSelection` The new named selection with the added members. Changes are also reflected on the same named selection upon which the method is called. .. rubric:: Notes Named selections are immutable. This method creates a new named selection with the added members. .. !! processed by numpydoc !! .. py:method:: remove_members(members: list[Union[ansys.geometry.core.designer.body.Body, ansys.geometry.core.designer.face.Face, ansys.geometry.core.designer.edge.Edge, ansys.geometry.core.designer.beam.Beam, ansys.geometry.core.designer.designpoint.DesignPoint, ansys.geometry.core.designer.component.Component, ansys.geometry.core.designer.vertex.Vertex, ansys.geometry.core.designer.designcurve.DesignCurve]]) -> NamedSelection Remove members from the named selection. :Parameters: **members** : :class:`python:list` :obj:`of` :obj:`Body`, :obj:`Face`, :obj:`Edge`, :obj:`Beam`, :obj:`DesignPoint`, :obj:`Component`, :obj:`or` :obj:`Vertex` The members to remove from the named selection. :Returns: :obj:`NamedSelection` The new named selection with the members removed. Changes are also reflected on the same named selection upon which the method is called. .. !! processed by numpydoc !! .. py:method:: __repr__() -> str Represent the ``NamedSelection`` as a string. .. !! processed by numpydoc !!