Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: japanfather on May 27, 2014, 09:19:45 pm
-
Hello everyone,
I have 120 .EAP files. I would like to convert these files into .xmi files (a batch-type manner). Should I implement a script or add-in in Enterprise Architect to transfer them? Please help me. Thank you! :)
-
Both is possible. Use the method you like most.
Usually the start with scripting is easier because you don't need the Addin stuff.
Helmut
-
Maybe you should tell use why you would do that transfer.
q.
-
Thank you to reply.
Maybe using script is easier especially in Linux shell script. Does Enterprise Architect support command in DOS or Linux?
I got this mission from my friend but I do not know his purpose:D
-
In EA you may use:
- VBScript
- JScript
- JavaScript
There's also a degugger available to make testing a lot easier.
Helmut
-
Thank you to reply.
Maybe using script is easier especially in Linux shell script. Does Enterprise Architect support command in DOS or Linux?
I got this mission from my friend but I do not know his purpose:D
Then you should the hell kick him and tell you why ;)
From where, to where, for what purpose?
q.
-
I will try to use JScript or JavaScript in EA and the debugger. I also will force my friend to tell his purpose ;)
-
Hi all, I also need this as I have many models and I want to compare these models by comparing the XMI files, instead of doing this for each
file, I want to convert it once. So could you help me ::)?!
-
Exporting a model via a script is fairly easy by using ExportPackageXMI from the project interface. But why the heck do you want to compare XMI? That sounds quite lunatic (sorry for the harsh words, but I can't find anything more reasonable).
q.
-
If you want to compare *.xmi files you may ask Stefan Bolleininger. If I remember right I has done something.
If I remember right in the community is something about batch import/export.
Besides all: Comparing *.xml files isn't an easy job. If you are able to reduce the compare to a small subset it might be useful. If you want to compare full UML than you have a great task and you possibly will fail.
Helmut
-
anyway let me try, I want to start with class diagram. how I can export class diagram for 10 EAP file to xmi, and how to specify which version of xmi I want (1.3, 2.00, ...) is it possible or I have to do it manually ::)
-
You can't even manually export a diagram.
q.
-
Sorry, I mean export class diagram in .EAP file into XMI file. But I want to know how I can do this automatically for 10 EAP files.
-
I already said: you can't export a diagram, except as bit image.
q.
-
Project --> Model Import/Export --> Export Package to XMI
from this you can export diagram to XMI file :-?
-
No. It's a package which you export. Not a diagram. So is it that? Export a package?
q.
-
yes, I do like this. can I do this automatically?!
-
Yes. You can export a package automatically. Use EAProjectInterface.ExportPackageXMI (see help for details)
Note that version control allows to save a package stub as XMI. This can't be done with the above (or you need to use ExportPackageXMIex). So if you export a package it will include all sub-packages.
q.
-
I will try, do you have an example, or tutorial
-
You might look into my Scripting book (shameless self plug) but that does not detail the above mentioned method.
Of course it depends on the language you want to use. To access the project interface object you need to retrieve it via EARepository.GetProjectInterface ()
q.
-
could you give me the link of your book, or where I can found it, please
-
It's the banner below my posts :-)
q.
-
Ohh thanks, I will share you when I succeed with the scripts
thank you