Book a Demo

Author Topic: How to batch export XMI multiple packages?  (Read 4346 times)

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
How to batch export XMI multiple packages?
« on: July 18, 2009, 01:44:42 pm »
We have 11 root packages in our project.

To XMI export the entire project I have to select each package on a one-by-one basis and serially do the XMI export for each package. Takes too long.

Ideally, I'd like to shift click all 11 packages and have them all XMI exported to eleven XMI files that have the same name as the package.

Does anyone know how to do this?

smendonc

  • EA User
  • **
  • Posts: 148
  • Karma: +5/-0
  • I love YaBB 1 Gold!
    • View Profile
Re: How to batch export XMI multiple packages?
« Reply #1 on: July 18, 2009, 03:34:47 pm »
I can think of two options:
1. Write a script to run the Project.ExportXMI method for each model root to export.
2. Right click a model root package, choose configure and select Batch export.  Configure this for each model root.  To run an export of all model roots from the menu select Project->Import/Export and choose Batch XMI Export.  All the marked packages (model roots) will show up and you can select all and then run to save them all at once.

In the help search for 'Configure a Controlled Package' and 'Batch XMI Import' for more details on 2.
Stan.

Thelonius

  • EA User
  • **
  • Posts: 274
  • Karma: +6/-0
  • I think. Therefore I get paid.
    • View Profile
Re: How to batch export XMI multiple packages?
« Reply #2 on: July 22, 2009, 09:59:16 am »
Quote
I can think of two options:
1. Write a script to run the Project.ExportXMI method for each model root to export.
2. Right click a model root package, choose configure and select Batch export.  Configure this for each model root.  To run an export of all model roots from the menu select Project->Import/Export and choose Batch XMI Export.  All the marked packages (model roots) will show up and you can select all and then run to save them all at once.

In the help search for 'Configure a Controlled Package' and 'Batch XMI Import' for more details on 2.
Stan.

Stan - thanks a lot for that! It works. Just tried it. But the significance of the Package Control Options is a bit daunting. If I tick the "Control Package" box - I am allowed to specify the directory to which to save the exported XMI file - which is very useful because (having played around with it a bit) if I don't do that - I will have to later - manually specify the directory to save each each XMI package to, when I do the batch export. Which I don't want, obviously.

But by ticking the Package Control Options box - what other unanticipated effects and implications could I be creating that I should be aware of before proceeding - I wonder?

I haven't been able to insert an image into this email - so I'll just provide a url to the Package Control Options dialogue box.

http://www.mediafire.com/?sharekey=f6699425503ae27800d27174b47c665715829899100d2feac95965eaa7bc68bc