Book a Demo

Author Topic: Can you get the profile used to stereotype an element  (Read 7620 times)

Robert Sheridan

  • EA User
  • **
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Can you get the profile used to stereotype an element
« on: December 03, 2016, 02:32:09 am »
Hello all,
I am wanting to use the API to extract the profile used to set the stereotype for an element.  I can get the stereotype but have not found anything in the API that gives me the profile, does anyone know how to do this.

Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Can you get the profile used to stereotype an element
« Reply #1 on: December 03, 2016, 03:48:47 am »
AFAIK there is nothing in the API to give you that information. What you need to do is to query t_xref:
Code: [Select]
SELECT description FROM t_xref WHERE client=<ea_guid of element>That will return something like
Code: [Select]
@STEREO;Name=ArchiMate_Junction;FQName=Archimate2::ArchiMate_Junction;@ENDSTEREO;
Use Repository.SQLQuery and parse the returned XML string.

q.

Robert Sheridan

  • EA User
  • **
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Re: Can you get the profile used to stereotype an element
« Reply #2 on: December 03, 2016, 04:14:15 am »
Thanks Qwerty, have been reading your book and that was where it was leading me.
Free uptick: the books have been very useful, very good investment.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Can you get the profile used to stereotype an element
« Reply #3 on: December 05, 2016, 08:16:14 am »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Can you get the profile used to stereotype an element
« Reply #4 on: December 05, 2016, 05:50:01 pm »
Doh! I just testet StereotypeEx  :-[

q.

Robert Sheridan

  • EA User
  • **
  • Posts: 105
  • Karma: +0/-0
    • View Profile
Re: Can you get the profile used to stereotype an element
« Reply #5 on: December 05, 2016, 09:20:42 pm »
Thanks Simon, did not spot that this had been added in to the API since I last did this (reusing old code).
Robert