ScriptingProject#
- class ansys.sam.sysml2.classes.scripting_project.ScriptingProject#
Bases:
abc.ABCScripting project interface for users.
Overview#
Get the project ID. |
|
Get the project name. |
|
Get a list of root packages. |
|
Get the root package. |
|
Find an element by ID. |
|
Find all elements by name. |
|
Start a transactional mode for model edition. |
|
Stop the current transaction. |
Get a list of root packages. |
|
Get the project name. |
|
Get the root package. |
Import detail#
from ansys.sam.sysml2.classes.scripting_project import ScriptingProject
Property detail#
- property ScriptingProject.root: List[ansys.sam.sysml2.classes.sysml_element.SysMLElement]#
Get a list of root packages.
- property ScriptingProject.root_package: ansys.sam.sysml2.classes.sysml_element.SysMLElement#
Get the root package.
Method detail#
- abstractmethod ScriptingProject.get_root() List[ansys.sam.sysml2.classes.sysml_element.SysMLElement]#
Get a list of root packages.
- abstractmethod ScriptingProject.get_root_package() ansys.sam.sysml2.classes.sysml_element.SysMLElement#
Get the root package.
- abstractmethod ScriptingProject.find_element_by_id(element_id: str) ansys.sam.sysml2.classes.sysml_element.SysMLElement#
Find an element by ID.
- Parameters:
- element_id
str Element ID.
- element_id
- Returns:
SysMLElementElement retrieved.
- abstractmethod ScriptingProject.find_elements_by_name(element_name: str) List[ansys.sam.sysml2.classes.sysml_element.SysMLElement]#
Find all elements by name.
- Parameters:
- element_name
str Name of elements.
- element_name
- Returns:
List[SysMLElement]List of elements retrieved.
- abstractmethod ScriptingProject.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.
- abstractmethod ScriptingProject.stop_transactional_mode()#
Stop the current transaction.
This method will close the current transaction and commit all changes to the server.