Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: WzDrg on June 30, 2015, 07:52:56 pm

Title: Custom reference
Post by: WzDrg on June 30, 2015, 07:52:56 pm
How can I create a custom reference using the automation interface?
Title: Re: Custom reference
Post by: Geert Bellekens 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
Title: Re: Custom reference
Post by: qwerty 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.
Title: Re: Custom reference
Post by: themiyac 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
Title: Re: Custom reference
Post by: qwerty on July 01, 2015, 03:35:37 am
If it's SysML I'm out of the game  :-/

q.
Title: Re: Custom reference
Post by: Geert Bellekens 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
Title: Re: Custom reference
Post by: qwerty 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.
Title: Re: Custom reference
Post by: Geert Bellekens 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
Title: Re: Custom reference
Post by: qwerty 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.