SysML2ProjectManager#
- class ansys.sam.sysml2.builder.sysml2_project_manager.SysML2ProjectManager(connector: ansys.sam.sysml2.api.sysml2_api_connector.SysML2APIConnector)#
Provides the director class for loading and managing projects.
Overview#
Get all projects of the connected user. |
|
Get a SysML project with its ID from the API and map it in a Python object. |
|
Get a scripting project with its ID from the API and map it in a Python object. |
|
Create a new project on the server and return it as a SysML Project. |
|
Create a new project on the server and return it as a Scripting Project. |
|
Delete the project with the given ID. |
|
Update the project with the given ID. |
Import detail#
from ansys.sam.sysml2.builder.sysml2_project_manager import SysML2ProjectManager
Method detail#
- SysML2ProjectManager.get_sysml_project(project_id: str, resolve_standard_libraries: bool = False, includes_derived: bool = True, includes_inherited: bool = True) ansys.sam.sysml2.classes.project.Project#
Get a SysML project with its ID from the API and map it in a Python object.
- Parameters:
- project_id
str ID of the project to load.
- resolve_standard_librariesbool, default:
False When
True, library element contents are resolved and mapped so they can be navigated. Only applied on first load; a cached project is returned as-is.- includes_derivedbool, default:
True When
True, include derived properties from the API/elementsresponse.- includes_inheritedbool, default:
True When
True, include inherited memberships and features from the API response.
- project_id
- Returns:
ProjectThe requested project, built from the API or returned from cache.
- SysML2ProjectManager.get_scripting_project(project_id: str, resolve_standard_libraries: bool = False, includes_derived: bool = True, includes_inherited: bool = True) ansys.sam.sysml2.classes.project.Project#
Get a scripting project with its ID from the API and map it in a Python object.
- Parameters:
- project_id
str ID of the project to load.
- resolve_standard_librariesbool, default:
False When
True, library element contents are resolved and mapped so they can be navigated. Only applied on first load; a cached project is returned as-is.- includes_derivedbool, default:
True When
True, include derived properties from the API/elementsresponse.- includes_inheritedbool, default:
True When
True, include inherited memberships and features from the API response.
- project_id
- Returns:
ProjectThe requested project, built from the API or returned from cache.
- SysML2ProjectManager.create_sysml_project(name: str, description: str = 'Project description', resolve_standard_libraries: bool = False, includes_derived: bool = True, includes_inherited: bool = True) ansys.sam.sysml2.classes.project.Project#
Create a new project on the server and return it as a SysML Project.
- Parameters:
- name
str Name of the project.
- description
str, default:"Project description" Description of the project.
- resolve_standard_librariesbool, default:
False When
True, library element contents are resolved and mapped so they can be navigated.- includes_derivedbool, default:
True When
True, include derived properties from the API/elementsresponse.- includes_inheritedbool, default:
True When
True, include inherited memberships and features from the API response.
- name
- Returns:
ProjectThe newly created project, fully built from the API.
- SysML2ProjectManager.create_scripting_project(name: str, description: str = 'Project description', resolve_standard_libraries: bool = False, includes_derived: bool = True, includes_inherited: bool = True) ansys.sam.sysml2.classes.project.Project#
Create a new project on the server and return it as a Scripting Project.
- Parameters:
- name
str Name of the project.
- description
str, default:"Project description" Description of the project.
- resolve_standard_librariesbool, default:
False When
True, library element contents are resolved and mapped so they can be navigated.- includes_derivedbool, default:
True When
True, include derived properties from the API/elementsresponse.- includes_inheritedbool, default:
True When
True, include inherited memberships and features from the API response.
- name
- Returns:
ProjectThe newly created project, fully built from the API.