SysML2ProjectBuilder#
- class ansys.sam.sysml2.builder.sysml2_project_builder.SysML2ProjectBuilder(connector: ansys.sam.sysml2.api.sysml2_api_connector.SysML2APIConnector)#
Provides the SysML2 project builder.
Overview#
Call the API with the specified project ID and build the SysML project from JSON. |
|
Call the API with the specified project ID and build the scripting project from JSON. |
|
Extract root elements and resolve inherited names in a single pass. |
|
Reload the project and update all its elements. |
Import detail#
from ansys.sam.sysml2.builder.sysml2_project_builder import SysML2ProjectBuilder
Method detail#
- SysML2ProjectBuilder.build_sysml_project(project_id: str, resolve_standard_libraries: bool = False, includes_derived: bool = True, includes_inherited: bool = True) ansys.sam.sysml2.classes.project.Project#
Call the API with the specified project ID and build the SysML project from JSON.
- Parameters:
- project_id
str ID of the project to build.
- resolve_standard_librariesbool, default:
False When
True, keep library elements’ references so their contents are resolved and mapped during the build.- 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 fully built SysML project.
- SysML2ProjectBuilder.build_scripting_project(project_id: str, resolve_standard_libraries: bool = False, includes_derived: bool = True, includes_inherited: bool = True) ansys.sam.sysml2.classes.project.Project#
Call the API with the specified project ID and build the scripting project from JSON.
- Parameters:
- project_id
str ID of the project to build.
- resolve_standard_librariesbool, default:
False When
True, keep library elements’ references so their contents are resolved and mapped during the build.- 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 fully built dynamic project.
- SysML2ProjectBuilder.extract_root_and_check_names(project: ansys.sam.sysml2.classes.project.Project, root_ids: set[str])#
Extract root elements and resolve inherited names in a single pass.
- SysML2ProjectBuilder.reload_project(modification_observer: ansys.sam.sysml2.observer.observer.ModificationObserver, project: ansys.sam.sysml2.classes.project.Project)#
Reload the project and update all its elements.
- Parameters:
- modification_observer
ModificationObserver Observer instance.
- project
Project Project instance to reload.
- modification_observer