Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nealthereader

Pages: [1]
1
Thanks Everyone
Solved

$project.ExportPackageXMI($peaid, 20, 1, '-1', 1, 1, $extractedFile)

somehow file path need back slash instead of forward.
$extractedFile="C:\eap\extracted.xml"

2
Here is my powershell script.
ExportPackageXMI may have some direction to answer but need help how to get there.

$eapDll="C:/Program Files (x86)/Sparx Systems/EA/Interop.EA.dll"
$eapFile="C:/eap/test.eap"
$extractedFile="C:/eap/extracted.xml"
[system.reflection.assembly]::LoadFile($eapDll)
$rep=New-Object EA.RepositoryClass
$rep.OpenFile($eapFile)
$project=New-Object EA.ProjectClass
#peaid is package guid
$peaid = $project.GUIDtoXML('{EB97F043-D87E-42ff-B58C-6645F9143C2C}')
#eaid is model guid
$eaid = $project.GUIDtoXML('{7598E729-E4D3-4f78-B339-01765F583D7A}')
#$project.ExportPackageXMI($peaid, 'xmiEA20', 1, '-1', 1, 1, $extractedFile)
#$project.PutDiagramImageToFile("{7598E729-E4D3-4f78-B339-01765F583D7A}",$extractedFile,0)
#$project.ExportPackageXMIEx($peaid, 'xmiEADefault', 1,'-1',1, 1, $extractedFile, 'epSaveToStub')
#Write-Output $project.EnumDiagramElements($eaid)
$project.Exit()

3
I use extracted bpmn file to show on web UI with http://bpmn.io/ library.

What I am trying to do is use powershell with Interop.EA.dll and programmatic extract diagram in bpmn2.0 xml
http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/project_2.html

4
Automation Interface, Add-Ins and Tools / extract diagram as bpmn2.0 xml
« on: August 10, 2016, 11:02:43 pm »
is it possible to extract bpmn2.0 xml from programatic interface?

Pages: [1]