Sparx Systems Forum

Discussion => Uml Process => Topic started by: rvi1cob on March 06, 2017, 05:06:32 am

Title: MDG Technology - Stereotype - Linked Document
Post by: rvi1cob on March 06, 2017, 05:06:32 am
Hello Everyone,

I am looking for a possible option for the below scenario.

I have a set of stereotypes defined in my MDG technology. Each of it has to be associated with its own "Linked document" template. I created as set of linked documents along with the MDG Technology.

After the technology is imported:
Is there any way when I create an element of the defined stereotype, the linked document is associated by default to a linked document template?

The reason is I have multiple stereotypes and each should use its own linked template. It would be weary to go through a list of document template otherwise.

Regards
Vijay
Title: Re: MDG Technology - Stereotype - Linked Document
Post by: Uffe on March 06, 2017, 07:57:23 pm
Hi Vijay,

First off, this question is better posted in the Automation Interface, Add-Ins and Tools forum.

In answer to your question, I don't think there's a way to achieve that using just MDG Technologies. You can do it by building an Add-In, which responds to the EA_OnPostNewElement event by checking the stereotype of the newly created element and creating the appropriate linked document.

Note that creating a linked document through the API requires loading the document from a file, so you'd need your template stored in the file system -- not in the MDG Technology or the EA project -- for this approach to work.

HTH,


/Uffe
Title: Re: MDG Technology - Stereotype - Linked Document
Post by: Simon M on March 07, 2017, 08:41:36 am
You can do what you are wanting by adding a single element pattern to the toolbox instead of a stereotype.

http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/toolbox_profiles.html (http://sparxsystems.com/enterprise_architect_user_guide/13.0/modeling_tools/toolbox_profiles.html)