Author Topic: Custom reference  (Read 5987 times)

WzDrg

  • EA Novice
  • *
  • Posts: 7
  • Karma: +0/-0
    • View Profile
Custom reference
« on: June 30, 2015, 07:52:56 pm »
How can I create a custom reference using the automation interface?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Custom reference
« Reply #1 on: June 30, 2015, 08:47:43 pm »
I don't think they are exposed in the API.
In that case you can only the backdoor and add them in the database directly.
You can use Repository.Execute to execute arbitrary SQL statements against the database.

I don't know for sure where these are stored in the database, but t_xref would be the first place I would look.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom reference
« Reply #2 on: June 30, 2015, 09:37:14 pm »
If you tell me how you create that custom reference manually I'll take a look on the automation part.

q.

themiyac

  • EA User
  • **
  • Posts: 26
  • Karma: +0/-0
    • View Profile
Re: Custom reference
« Reply #3 on: July 01, 2015, 12:52:17 am »
I'm looking at a similar thing. I'm concerned with creating a reference association through the automation interface. A SysMl reference association can be created manually by Diagram-->Toolbox-->SysMl Block Relationships --> Reference Association.
If someone could offer guidance on how I can both create and access the values of a reference association, it would be greatly appreciated.
Thanks

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom reference
« Reply #4 on: July 01, 2015, 03:35:37 am »
If it's SysML I'm out of the game  :-/

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Custom reference
« Reply #5 on: July 01, 2015, 02:24:51 pm »
Quote
I'm looking at a similar thing. I'm concerned with creating a reference association through the automation interface. A SysMl reference association can be created manually by Diagram-->Toolbox-->SysMl Block Relationships --> Reference Association.
If someone could offer guidance on how I can both create and access the values of a reference association, it would be greatly appreciated.
Thanks
Hi themiyac,

I don't think it's the same thing. The custom references are a special EA thing that you control via the context menu Add Custom Reference. The Reference Association is probably just a connector with a SysML stereotype. If you have a question about that it's better to start your own topic.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom reference
« Reply #6 on: July 01, 2015, 06:58:12 pm »
i remember having seen that custom references but now I can't find any context menu like that. Neither for classes nor for objects. Is it there for just particular elements?

q.
« Last Edit: July 01, 2015, 06:58:26 pm by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Custom reference
« Reply #7 on: July 01, 2015, 07:22:13 pm »
It's only from the project browser :-X

From a diagram is directly Add Custom Reference...
From an element its Add|Add Custom Reference...

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Custom reference
« Reply #8 on: July 01, 2015, 09:17:52 pm »
Aaah! It took me a couple of extra looks...

As Geert already pointed out the information is placed in t_xref.

Name = Element
Type = reference
Supplier = guid of the element where the reference has been added
Client = guid of the object that has been referenced

q.
« Last Edit: July 01, 2015, 09:18:10 pm by qwerty »