Book a Demo

Author Topic: XMI export: object identification  (Read 3459 times)

Maxim Kuznetsov

  • EA Novice
  • *
  • Posts: 6
  • Karma: +2/-0
    • View Profile
XMI export: object identification
« on: July 13, 2014, 07:42:44 am »
Hi!

What attribute of an object from EA Repository should I use to find the same object exported in XMI file?

I believed it is GUID attribute, but I found what GUID is not (!) exported in XMI for Packages, and for other types (requirements) it's exported in inconvenient format such as "<UML:TaggedValue tag="$ea_xref_property" value="$XREFPROP=$XID={E8B58A5F-D2DF-417b-AF7F-E1339FC5EA14}$XID;$NAM=Stereotypes$NAM;$TYP=element property$TYP;$VIS=Public$VIS;$PAR=0$PAR;$DES=@STEREO;Name=Functional;GUID={A1A36636-2DA8-4a91-B257-795FBBCC4F73};@ENDSTEREO;$DES;$CLT={47C79472-F547-4039-8B94-818E50E44383}$CLT;$SUP=<none>$SUP;$ENDXREF;" />
"

It seems the best solution is to use "xmi.id" attribute of XMI, but how can I get it from EA Repository? I didn't find such property of API Element object...

My scenario is:
1) export EA Model to XMI
2) import XMI into MS Word document as Custom XML Part
3) insert Content Control into Word document
4) go into EA UI, select object in Project Browser, get indentifier of selected object [size=9](by script? is it possible to programmatically copy script output directly into Windows clipboard?)[/size]
5) use the identifier to programmatically map Content Control to object in Custom XML Part

thanks in advance!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: XMI export: object identification
« Reply #1 on: July 13, 2014, 06:08:20 pm »
The GUID in the repository has a format  {xxxx-xxxx-xxxx} while in the XMI it is stored as xxxx_xxxx_xxxx. So you just need to replace the minus with underscore and remove the curly brackets.

q.