Book a Demo

Author Topic: GUID of parent class in exported language  (Read 2890 times)

Phips

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
GUID of parent class in exported language
« on: November 15, 2008, 12:10:42 am »
Hi,

I have defined a new language with templates to create a special source code in xml-format.

Everything works fine and I can generate my code for a any class model.

Only one problem is left:

I need the GUID of the parent class.

Any clue ?

With kind regards

Philipp Schneider

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: GUID of parent class in exported language
« Reply #1 on: November 17, 2008, 08:26:53 am »
Parent at destination end of generalization connector, or an owning class?

The generalized class could be found by iterating over connectors with the type of generalization, and the source matching your current element.  You'll need to add a custom template in order to do this from code templates.

eg.
Code: [Select]
%list="Connector__DestGUID" @separator="\n" connectorSourceElemGUID=elemGUID and connectorType=="Generalization"%
You could also use an add-in call (EXEC_ADD_IN) to do either one.

Phips

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: GUID of parent class in exported language
« Reply #2 on: November 19, 2008, 09:32:40 pm »
Thanks, works fine.
I did not notice and consider the little asterisk in the documentation
at the end of connectorSourceElem*

By the way, the documentation could show more details and examples.
Most of the questions in this forum are caused by missing details in the documentation.

Kind regards