Author Topic: XMI Import (ImportPackageXMI) without diagrams  (Read 4847 times)

Knut Jetlund

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I am the lizard king. I can do anything
    • View Profile
XMI Import (ImportPackageXMI) without diagrams
« on: July 17, 2014, 05:57:19 pm »
I want to create a fresh working copy of a package by importing it's version controlled xmi file, and stripping GUIDs. I would also like to get rid of the diagrams.

My code looks like this:
ePIF.ImportPackageXMI(pkNVDBSOSI.PackageGUID, xmiFile, 0, 1)

This works just fine, except that the diagrams get imported too, even though the parameter "ImportDiagrams" (long) is set to 0, to specify that i do not want to import the diagrams. The possible values for this parameter is not described in the EA help file, but the equivalent parameter "DiagramXML" for ExportPacageXMI has 0 for "Do not export diagrams". Is there some other value than 0 that means "false"?
Knut Jetlund
Norwegian Public Roads Administration

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: XMI Import (ImportPackageXMI) without diagrams
« Reply #1 on: July 17, 2014, 06:38:56 pm »
Three steps - one mandatory and two alternatives. 1) Report a bug. 2a) Write a XLST to clean the XMI. 2b) Run a script to remove the diagrams after import.

q.

Knut Jetlund

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I am the lizard king. I can do anything
    • View Profile
Re: XMI Import (ImportPackageXMI) without diagrams
« Reply #2 on: July 17, 2014, 06:51:08 pm »
Thanks. I have reported it as a bug, even though I'm not sure it is. It might also be that I am using the wrong number for setting "ImportDiagrams" to false. That's why I put it up here.

And I do have a script for removing the diagrams after import, but this should not be necessary if ImportPackageXMI work as intended.
Knut Jetlund
Norwegian Public Roads Administration

aloeffen

  • EA User
  • **
  • Posts: 37
  • Karma: +0/-0
    • View Profile
Re: XMI Import (ImportPackageXMI) without diagrams
« Reply #3 on: September 25, 2014, 11:05:46 pm »
Knut,
ImportPackageXMI(ID,...) seems to import at model level (when ID is model ID). I don't see how it can import a complete XMI, i.e. build an EA repository (*.EAP) from an XMI file. You seem to do that here if I understand you correctly. What's the trick?
Thanks,
Arjan


Knut Jetlund

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
  • I am the lizard king. I can do anything
    • View Profile
Re: XMI Import (ImportPackageXMI) without diagrams
« Reply #4 on: September 25, 2014, 11:18:18 pm »
Hi Arjan
No, I don't build a EA Repository. I am importing the XMI file into an existing repository, but as a new package with new GIUDs and without version control.
Sorry for the confusion.  :)
Knut Jetlund
Norwegian Public Roads Administration

VKN

  • EA User
  • **
  • Posts: 187
  • Karma: +9/-1
    • View Profile
Re: XMI Import (ImportPackageXMI) without diagrams
« Reply #5 on: September 26, 2014, 09:38:27 am »
Quote
Thanks. I have reported it as a bug, even though I'm not sure it is.
It is certainly a bug. Hopefully, will be fixed soon.