Skip to content

Diagram Export

LemonTree.Connect.Automation for Polarion supports diagram export.

Limitations

Diagram images can't be extracted directly, as this requires access to the Enterprise Architect API, which LTCA usually doesn't have. This means diagrams must be extracted from EA externally. A script should export all diagrams recursively within a target package and save them as image files in a specified folder. Change detection is handled by LemonTree.Connect, so your script does not need to manage that. Any diagram images found in that folder will be included during export, missing diagrams will be skipped. Mapping of the images is done via GUID in the filename.

Setup

Please find detailed information about the setup in the following image, showing a deployment diagram for the export of diagrams.

Diagram Export

The following nodes and scripts are shown on the deployment diagram:

Name Description
Build Server Environment A build agent like GitHub Actions, Jenkins, GitLab Actions, Azure DevOps, etc.
LemonTree.Connect.Automation for Polarion Reads elements from the model and diagram images from a given folder
Build Pipeline Script Your script executing the build pipeline (f.e. yml, bash, python, etc.).
Diagram Extraction Script A script that reads the EA model via API, extracts all diagrams from a given package and places them into a folder. Not provided or maintained by LieberLieber, but if you need support feel free to contact us
Folder in file system Folder where the diagrams are extracted to. Images are in the format {EA_GUID}.extension (f.e. {0687FAD5-EA1C-4968-9C50-745DEA0C4B4F}.png)
Polarion Server Polarion Server used for export

Usage

For diagram export there are two main parameters:

Argument Description
--DiagramPath for specifying the folder where diagrams are read from
--DiagramFileExtension to define which file extension is used, options are bmp, jpg and png (default)

Powershell Example

LemonTree.Connect.Polarion.Automation.exe export 
    --Model EaModel.qeax --PackageGuid {0A6B2E86-825D-4c11-A44E-98B98DABB6EB}  
    --Mapping PolarionExportMapping.xml 
    --ServerUrl http://test-polarion-3/polarion 
    --Project PolarionProjectForExport 
    --Username username 
    --Password password 
    --License "C:\!Work\Tools\LT.Connect.Automation\Polarion\ltcPolarionAutomation.lic"  
    --DiagramFileExtension png 
    --DiagramPath C:\!Work\Testing\Polarion\Automation\DiagramExportTest\diagrams\

Image files need to be named like {ElementGuid}.extension, for example {0687FAD5-EA1C-4968-9C50-745DEA0C4B4F}.png.