ProjectImpl#
- class ansys.sam.sysml2.builder.classes.project_impl.ProjectImpl(project_id: str, name: str)#
Bases:
ansys.sam.sysml2.classes.project.ProjectProvides a private class for project building.
Overview#
Add an element to the project environment. |
|
Update all unresolved fields. |
|
Get a list of root packages. |
|
Get the project ID. |
|
Get the root package. |
|
Get the project name. |
|
Find an element by its ID. |
|
Find all elements by name. |
|
Start a transactional mode for model edition. |
|
Stop the current transaction. |
Import detail#
from ansys.sam.sysml2.builder.classes.project_impl import ProjectImpl
Method detail#
- ProjectImpl.add_element(element: ansys.sam.sysml2.meta_model.element.Element)#
Add an element to the project environment.
- ProjectImpl.update_unresolved_fields(unresolved_fields: List[ansys.sam.sysml2.classes.unresolved_field.UnresolvedField])#
Update all unresolved fields.
- Parameters:
- unresolved_fields
List[UnresolvedField] List of all new fields.
- unresolved_fields
- ProjectImpl.get_root() List[ansys.sam.sysml2.meta_model.package.Package]#
Get a list of root packages.
- Returns:
List[Package]List of root packages.
- ProjectImpl.get_root_package() ansys.sam.sysml2.meta_model.package.Package#
Get the root package.
- ProjectImpl.find_element_by_id(element_id: str) ansys.sam.sysml2.meta_model.element.Element#
Find an element by its ID.
- Parameters:
- element_id
str Element ID.
- element_id
- Returns:
ElementElement retrieved.
- ProjectImpl.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]List of elements retrieved.
- ProjectImpl.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.
- ProjectImpl.stop_transactional_mode()#
Stop the current transaction.
This method will close the current transaction and commit all changes to the server.