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. |
|
Update the element with inherited elements. |
|
Clear all inherited elements in the element. |
|
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) ansys.sam.sysml2.classes.project.Project#
Call the API with the specified project ID and build the SysML project from JSON.
- SysML2ProjectBuilder.build_scripting_project(project_id: str) ansys.sam.sysml2.classes.scripting_project.ScriptingProject#
Call the API with the specified project ID and build the scripting project from JSON.
- SysML2ProjectBuilder.extract_root_and_check_names(project: ansys.sam.sysml2.classes.project.Project | ansys.sam.sysml2.classes.scripting_project.ScriptingProject)#
Extract root elements and resolve inherited names in a single pass.
Both operations are combined into one iteration over the project environment to avoid looping twice.
- SysML2ProjectBuilder.update_element(element)#
Update the element with inherited elements.
- Parameters:
- element
SysMLElement The element to update.
- element
- SysML2ProjectBuilder.clear_element(ignore_list, element)#
Clear all inherited elements in the element.
- Parameters:
- ignore_list
list List of attributes to ignore when clearing.
- element
SysMLElement The element to clear.
- ignore_list
- SysML2ProjectBuilder.reload_project(modification_observer: ansys.sam.sysml2.observer.observer.ModificationObserver, project: ansys.sam.sysml2.classes.project.Project | ansys.sam.sysml2.classes.scripting_project.ScriptingProject)#
Reload the project and update all its elements.
- Parameters:
- modification_observer
ModificationObserver Observer instance.
- project
Project|ScriptingProject Project instance to reload.
- modification_observer