Book a Demo

Author Topic: Parameterized class information in EA 9  (Read 3199 times)

Jim Beck

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Parameterized class information in EA 9
« on: May 26, 2011, 08:59:43 am »
Parameterized class information via the automation infterface appears to have moved from element.get_miscData() to somewhere uknown to me.  Anyone have any ideas?

Thanks!

Jim

Jim Beck

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: Parameterized class information in EA 9
« Reply #1 on: May 27, 2011, 06:01:46 am »
Until I hear back from tech support I am going to move forward with an SQL hack.  Looking at the XMI shows that parameterized class (e.g. C++ template) parameters can be found in table t_xref:

String xmi = r.SQLQuery("select * from t_xref where t_xref.Client = \"" + e.ElementGUID+ "\"");

In other words "give me all t_xref rows that have client GUID equal to my classes GUID".  This gives more than template parameters, but I can get it out of there at least.  In the middle of a resulting XML pile, it looks like:

Name=TOneOfMyClasParameters;Type=ClassifierTemplateParameter;ParameteredElementType=class;Pos=1

I hope the automation interface has a method for getting this information directly, but I just have not been able to find it.
« Last Edit: May 27, 2011, 06:02:32 am by jimbeck »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Parameterized class information in EA 9
« Reply #2 on: May 27, 2011, 04:12:05 pm »
Jim,

Have you tried the Element.CustomProperties or Element.Properties ?

Geert