:class:`ScriptingProject` ========================= .. py:class:: ansys.sam.sysml2.classes.scripting_project.ScriptingProject Scripting project interface for users. .. !! processed by numpydoc !! .. py:currentmodule:: ScriptingProject Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~get_id` - Get the project ID. * - :py:attr:`~get_name` - Get the project name. * - :py:attr:`~get_root` - Get a list of root packages. * - :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.scripting_project import ScriptingProject Method detail ------------- .. 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() -> List[ansys.sam.sysml2.classes.sysml_element.SysMLElement] Get a list of root packages. .. !! processed by numpydoc !! .. py:method:: get_root_package() -> ansys.sam.sysml2.classes.sysml_element.SysMLElement Get the root package. .. !! processed by numpydoc !! .. py:method:: find_element_by_id(element_id: str) -> ansys.sam.sysml2.classes.sysml_element.SysMLElement Find an element by ID. :Parameters: **element_id** : :class:`python:str` Element ID. :Returns: :obj:`SysMLElement` Element retrieved. .. !! processed by numpydoc !! .. py:method:: find_elements_by_name(elements_name: str) -> List[ansys.sam.sysml2.classes.sysml_element.SysMLElement] Find all elements by name. :Parameters: **elements_name** : :class:`python:str` Name of elements. :Returns: :obj:`List`\[:obj:`SysMLElement`] 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 !!