Project#
- class ansys.sam.sysml2.classes.project.Project#
Bases:
abc.ABCProvides the project interface for users.
Overview#
Get the project ID. |
|
Get the project name. |
|
Get the first package owned by the root Namespace. |
|
Get the packages owned by the root Namespace. |
|
Get the libraries packages. |
|
Find an element by ID. |
|
Find all elements by name. |
|
Start a transactional mode for model edition. |
|
Stop the current transaction. |
Import detail#
from ansys.sam.sysml2.classes.project import Project
Property detail#
Method detail#
- abstractmethod Project.get_root_package() ansys.sam.sysml2.meta_model.package.Package#
Get the first package owned by the root Namespace.
- abstractmethod Project.get_root_packages() list[ansys.sam.sysml2.meta_model.package.Package]#
Get the packages owned by the root Namespace.
- abstractmethod Project.get_libraries_packages() list[ansys.sam.sysml2.meta_model.package.Package]#
Get the libraries packages.
- abstractmethod Project.find_element_by_id(element_id: str) ansys.sam.sysml2.meta_model.element.Element#
Find an element by ID.
- Parameters:
- element_id
str Element ID.
- element_id
- Returns:
ElementElement retrieved.
- abstractmethod Project.find_elements_by_name(element_name: str) List[ansys.sam.sysml2.meta_model.element.Element]#
Find all elements by name.
- Parameters:
- element_name
str Name of elements.
- element_name
- Returns:
List[Element]The list of elements retrieved
- abstractmethod Project.start_transactional_mode()#
Start a transactional mode for model edition.
Direct model updates are suspended and every change is registered until the transaction is committed or stopped. Calculated modifications are applied only once all changes are committed.
- abstractmethod Project.stop_transactional_mode()#
Stop the current transaction.
Close the current transaction and commit all changes to the server.