Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: WzDrg on June 30, 2015, 07:52:56 pm
-
How can I create a custom reference using the automation interface?
-
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
-
If you tell me how you create that custom reference manually I'll take a look on the automation part.
q.
-
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
-
If it's SysML I'm out of the game :-/
q.
-
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
-
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.
-
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
-
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.