:class:`Project` ================ .. py:class:: ansys.sam.sysml2.classes.project.Project Provides the project interface for users. .. !! processed by numpydoc !! .. py:currentmodule:: Project Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~get_root` - Get a list of root packages. * - :py:attr:`~get_id` - Get the project ID. * - :py:attr:`~get_name` - Get the project name. * - :py:attr:`~get_root_package` - Get the root package. * - :py:attr:`~find_element_by_id` - Find an element by ID. * - :py:attr:`~find_elements_by_name` - Find all elements by name. * - :py:attr:`~start_transactional_mode` - Start a transactional mode for model edition. * - :py:attr:`~stop_transactional_mode` - Stop the current transaction. Import detail ------------- .. code-block:: python from ansys.sam.sysml2.classes.project import Project Method detail ------------- .. py:method:: get_root() -> List[ansys.sam.sysml2.meta_model.package.Package] Get a list of root packages. .. !! processed by numpydoc !! .. py:method:: get_id() -> str Get the project ID. .. !! processed by numpydoc !! .. py:method:: get_name() -> str Get the project name. .. !! processed by numpydoc !! .. py:method:: get_root_package() -> ansys.sam.sysml2.meta_model.package.Package Get the root package. .. !! processed by numpydoc !! .. py:method:: find_element_by_id(element_id: str) -> ansys.sam.sysml2.meta_model.element.Element Find an element by ID. :Parameters: **element_id** : :class:`python:str` Element ID. :Returns: :obj:`Element` Element retrieved. .. !! processed by numpydoc !! .. py:method:: find_elements_by_name(elements_name: str) -> List[ansys.sam.sysml2.meta_model.element.Element] Find all elements by name. :Parameters: **elements_name** : :class:`python:str` Name of elements. :Returns: :obj:`List`\[:obj:`Element`] The list of elements retrieved .. !! processed by numpydoc !! .. py:method:: start_transactional_mode() Start a transactional mode for model edition. This method will stop direct update for the model, and register all changes until you commit or stop the transactional mode. Warning, all calculated modifications will not be applied, until the commit of all changes. .. !! processed by numpydoc !! .. py:method:: stop_transactional_mode() Stop the current transaction. This method will close the current transaction and commit all changes to the server. .. !! processed by numpydoc !!