Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ondrej Kolenaty

Pages: [1] 2
1
Suggestions and Requests / Re: Element's attribute reference in notes
« on: February 29, 2008, 09:51:50 pm »
Sure I understand, but there is a problem with EAOE and EA 7.1. Since the RTF notes are stored in diferent format and are damaging notes stored by EAOE. Also I find a bit unlucky way how to make exports.

2
Suggestions and Requests / Element's attribute reference in notes
« on: February 29, 2008, 03:01:55 am »
Would it be possible to any element's attribute (ie. name, value of Tagged Value etc.) to notes and scenarios (the RTF ones newly in EA 7.1). That will update after change in the target element?

An example: in class A note i would like to refer to class B's name. And after I change name of B to "C" the note in class A will remain uptudate and the note will contain "C" instead of "B".

3
The result of the template call is a resultin text after processing all macros. So I guess the answer for Your quwstion is custom template containing only:

my return value

That's all. no qoutes, no assignment to a variable.

More complicated way can be this:

$return="my return value"
$return

the second row makes "my return value" be te result of the custom template

4
For multicolum PK you have to put into class transformation template a PrimaryKey {} section with one or more Column {} in it. For example create a new attribute template named Attribute__Primary_Key with such content:

$isPk=%FIND(%attStereotype%, "PK")%  
%if $isPk != "-1"%
Column
{
 %if attAlias != ""%
    name=%qt%%attAlias%%qt%
  %else%
    name=%qt%%EXEC_ADD_IN("CS_AdisAddin", "getClassAlias", attClassifierGUID)%%qt%
  %endIf%
}
%endIf%

and in class templete use it:

PrimaryKey
    {
      name=%qt%pk%classAlias%%qt%
      %list="Attribute__Primary_Key" @separator="\n" @indent="  "%
    }

5
Hello,

  is there any way how to run scripts from model via automation interface?

Thank You.

6
Hi,

  I guess You have used the Diagram property SelectedObjects, use DiagramObjects instead. Or explain the situation while getting the error better - piece of code would be also fine.

7
Automation Interface, Add-Ins and Tools / Re: Attribute set as Property
« on: November 23, 2010, 07:30:16 pm »
Hi,

  I am not sure, that I have get Your point, but I guess You mean, that You are trying to make a model transformation template, which will make a C# class model from some class model.

In that case I would change Attribute template to ommit creation of Attribure {} section in case the transformed attribute have the special stereotype. And I will generate the required Operations instead.

8
Hello, I guess that Your only option is to create a new element and copy value of each read/write property, which You find in reference part of help. Also You should not ommit attributes, scenarios, tagged values etc.

9
Few years ago I was facing same problem as You do now. I made an add-in to solve this problem. Send me Your email by private message so I can send it to You with some example, if You wish.

10
Hello,

  is there any way how to manage custom cross references trough Automation Interface? There is no clue on this topic in help.

Thank You.

P.S: The way going directly to database is not solution.

11
Both columns in database has an index. Still the practise can show a difference.

12
Hi,

  does anyony know whether there is any speed diference, if any, between Repository.GetElementById and Repository.GetElementByGUID functions?
 I am making quite complicated transformation, with usage of addin functions, and I would like to improve the performance.

Thx.

13
The sentence in help means, that you cannot do
Code: [Select]
notNull="something", but if you want a column to be not null, just use
Code: [Select]
notnull.

Example:
Code: [Select]
Column
{
  name="IAmNotNull"
  notnull
}

I tried "primaryKey" flag to make a column primary key, but that doesn't work. Anyway you can use:
Code: [Select]
Table
{
  PrimaryKey
  {
    Column
    {
      name="id"
      type=.......
    }
  }
}

14
I tried the wiki.eausergroup.org and it's down. Did it move elsewhere?

15
See the intermediate file. Probably you have there defined the foreign key twice. This is since EA is going trough the Conector template twice. Once for source element and second for target element.

I am filtering the second template call and everithing works fine. Also my experience is to create the column out of foreign key definition and in the FK definition just use the "name" of the column.

Code: [Select]
Column
{
  name="XXX"
 ...
}

ForeignKey
{
  Source
  {
    // Xreference to source table
    Column
    {
      name="XXX"
    }
  }
  Target
  {
    // Xreference to dest table
    Column
    {
      name="thePrimaryKey"
    }
  }
}

Pages: [1] 2