MSOffice
#
- class ansys.scade.almgw_msoffice.msoffice.MSOffice#
Bases:
ansys.scade.pyalmgw.connector.Connector
Specialization of the connector for MS Office.
Initialize the MS Office connector.
Overview#
Return the documents specified in the project. |
|
Return the path of the temporary file containing the requirements and traceability. |
|
Return the path of the file containing the traceability. |
|
Update the traceability data and produce a traceability matrix. |
|
Import requirements and traceability links to ALM Gateway. |
|
Run Microsoft Word with the document containing the requirement and locate it. |
|
Run Microsoft Word with the first referenced document. |
|
Stub the command |
|
Open the document, and locate the requirement when not empty. |
|
Read all the requirements from the documents. |
Import detail#
from ansys.scade.almgw_msoffice.msoffice import MSOffice
Attribute detail#
- MSOffice.map_requirements#
Method detail#
- MSOffice.get_documents() List[pathlib.Path] #
Return the documents specified in the project.
- MSOffice.get_reqs_file() pathlib.Path #
Return the path of the temporary file containing the requirements and traceability.
- MSOffice.get_trace_file() pathlib.Path #
Return the path of the file containing the traceability.
- MSOffice.on_export(links: pathlib.Path, pid: int) int #
Update the traceability data and produce a traceability matrix.
This function updates the tracability data in a separate file.
It produces the traceability matrices when an export configuration file is specified in the project.
Parameters#
- linksPath
Path of a JSON file that contains the links to add and remove.
- pidint
SCADE product process ID.
Returns#
int
-1: if an error occurs, therefore previous export status and requirement tree shall be kept
0: requirements and traceability links shall not be exported
1: requirements and traceability links shall be exported
2: previous export status and requirement tree shall be kept
- MSOffice.on_import(file: pathlib.Path, pid: int) int #
Import requirements and traceability links to ALM Gateway.
The function reads the requirements from the documents and adds the traceability data stored in a separate file.
Parameters#
- pathPath
Absolute path where the XML requirements file is saved.
- pidint
SCADE product process ID.
Returns#
int
-1: if an error occurs, therefore previous export status and requirement tree shall be kept
0: requirements and traceability links shall be correctly imported
- MSOffice.on_locate(req: str, pid: int) int #
Run Microsoft Word with the document containing the requirement and locate it.
Parameters#
- reqstr
Identifier of a requirement defined in a document.
- pidint
SCADE product process ID.
Returns#
int
-1: if an error occurs executing the command
0: if the command is successfully executed
- MSOffice.on_manage(pid: int) int #
Run Microsoft Word with the first referenced document.
Parameters#
- pidint
SCADE product process ID.
Returns#
int
-1: if an error occurs launching the command
0: if ‘Management Requirements’ UI of ALM tool is successfully launched
1: to clean requirement list on the SCADE IDE ‘Requirements’ window
- MSOffice.on_settings(pid: int) int #
Stub the command
settings
.Nothing to do, the settings are managed by a dedicated plug-in.
Parameters#
- pidint
SCADE product process ID.
Returns#
int
-1: if an error occurs, therefore previous settings information shall be kept
0: set settings information shall be OK
1: ALM Gateway project shall be removed, i.e., ALM connection shall be reset
- MSOffice.open_document(file: pathlib.Path, req: str)#
Open the document, and locate the requirement when not empty.
- MSOffice.read_requirements(project: ansys.scade.pyalmgw.documents.ReqProject)#
Read all the requirements from the documents.