AnsysProject#
- class ansys.sam.sysml2.tools.ansys_project.AnsysProject(server_url: str, token: str, organization_id: str, project_id: str, use_ssl: bool = True)#
Complete Ansys SysML2 project implementation with integrated capabilities.
Overview#
Download a single diagram and save it to disk. |
|
Download all diagrams as a ZIP archive. |
|
Check if diagram functionality is available for this project. |
|
Get information about available diagrams in the project. |
|
Get information about a diagram in the project. |
Getter property for factory. |
Import detail#
from ansys.sam.sysml2.tools.ansys_project import AnsysProject
Property detail#
- property AnsysProject.factory: ansys.sam.sysml2.tools.factory.Factory#
Getter property for factory.
Method detail#
- AnsysProject.download_diagram(diagram_id: str, path: str | pathlib.Path, file_format: str = 'svg', filename: str = '') str#
Download a single diagram and save it to disk.
- Parameters:
- Returns:
strReturn the path of the file created.
- Raises:
DiagramNotAvailableExceptionIf diagram functionality is not available for this project.
DiagramConnectorExceptionIf the download fails or HTTP response is not 200.
- AnsysProject.download_all_diagrams(path: str | pathlib.Path, file_format: str = 'svg', filename: str = '') str#
Download all diagrams as a ZIP archive.
- Parameters:
- Returns:
strPath to the saved ZIP file.
- Raises:
DiagramNotAvailableExceptionIf diagram functionality is not available for this project.
DiagramConnectorExceptionIf the download fails or HTTP response is not 200.
- AnsysProject.is_diagrams_available() bool#
Check if diagram functionality is available for this project.
- Returns:
- bool
True if diagrams can be downloaded, False otherwise.
- AnsysProject.get_project_diagrams_info() dict#
Get information about available diagrams in the project.
- Returns:
dictDictionary containing diagram information.
- Raises:
DiagramNotAvailableExceptionIf diagram functionality is not available for this project.
- AnsysProject.get_single_diagram_info(diagram_id: str) dict#
Get information about a diagram in the project.
- Parameters:
- diagram_id: str
ID of the diagram we want info about.
- Returns:
dictDictionary containing diagram information.
- Raises:
DiagramNotAvailableExceptionIf diagram functionality is not available for this project.