Author Topic: XML import/export of complete EAP Project File  (Read 7224 times)

fprog26

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
XML import/export of complete EAP Project File
« on: April 29, 2006, 11:19:01 am »
Basically, my request is very simple.

I want to be able to dump an entire "EAP" project file *AS IS* with "COMPLETE" information
(NOTHING must be stripped, such that it can be reimported back *AS IS*):

- diagrams
- schemas
- class information  
- class diagrams
- state machine
- activity diagram
- use cases
- package diagrams
- behavior code
- notes
- initial code
- relationships
- links, (X,Y)-(width,height) position of elements
- fonts being used
- curvature and bends into the association lines
- all attributes, operations, functions

Basically, everything into 1 BIG XML file,
even if it's 600 MB, I don't care, just gzip it if needed.

It does not have to be fast or even efficient,
it just have to work, even if it takes an hour
and it's crude, to import/export, that's fine with me.

AS LONG AS it is a "one to one" identical copy of the EAP binary file serialized into one BIG XML file.

I could explain in detail, why I need this, but to make it short "my fancy scripting needs is way ahead and too advance for what EAP currently offers", such that
I have to rely on exporting stuff that is tagged.
That is "so so" for now, but the remaining 20%
cannot be done without that XML export.

But I have no way of reimporting it back into Enterprise Architect, such that the project is always "in sync".

If any one knows a way of importing/exporting a complete EAP project using other tools... let me know.
Any open format or detailled format will do, XML is just one of them, any text format is preferred.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XML import/export of complete EAP Project File
« Reply #1 on: April 29, 2006, 12:09:43 pm »
Not a problem.

Do the following:
  • Open your source model in EA as usual.
  • Select the model itself (i.e. the root element) in the Project View tree.
  • Either: right-click the model element you just selected and use the context menu, or use the Ctrl-Alt-E hot key to get the Export Model to XML dialog. (This is the same hot key that exports a package, but when you select the model root it acts differently.)
  • Set the options you want in the dialog and export.
  • Open or create your target model (remembering that it will be completely overwritten).
  • Select the model root element in the Project View tree.
  • Right click and use the context menu, or use the Ctrl-Alt-I hot key to access the Import Model from XML dialog. (Once again this is a variant of the import package function that works on entire models.
  • Set the options as appropriate and import the file - you will have to confirm that you will be overwriting the target model.
This should solve your problem.

[Note that if you have multiple roots (i.e. several models in one EA project, this applies to each one separately. This is probably a rare enough case that you would have mentioned it if it applied to you. If you want to handle this case you can either export and import each one separately - in this case you will have to create 'dummy' project roots in the target model that will be overwritten; or create a short add-in or external automation program to interate through the source models.]

HTH,
David
No, you can't have it!

fprog26

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: XML import/export of complete EAP Project File
« Reply #2 on: April 30, 2006, 06:11:06 pm »
Then why not have a "Save as EAX" / "Open as EAX" options, would be much simpler...
BTW, I don't want to "Select anything",
I want an exact photocopy of the file in XML.

I will try it tomorrow...

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: XML import/export of complete EAP Project File
« Reply #3 on: May 01, 2006, 04:37:44 am »
Quote
Then why not have a "Save as EAX" / "Open as EAX" options

This function - and its analogue at the package level - provides one of the mechanisms for sharing models in a distributed team. Thus, saving and opening entire files was not quite what they were looking for. As well, XMI provides a standard mechanism for communicating UML information (versus a standard interchange, which is still a ways off) that EA, like other products, uses to write and read this type of info. Note that EA can read some other 'dialects' of XMI.

Quote
I don't want to "Select anything"

You have to select - as in highlight - the top node (the model itself) before you call up the menu so EA knows that you want to export the entire model (which you say you want to do) instead of just a given package tree. Follow the directions as stated and you should get the result you are looking for.
No, you can't have it!