Blog Post

Quick Link Definition Simplified

Overview:

‘Quick link’ feature in Enterprise Architect’s makes connector creation quicker and easier. Though quick linker simplifies the concept of creating connectors between artifacts (or) elements, the process of defining it would really consumes huge amount of time and manual efforts sometimes lead to errors.

To overcome this we have created a custom script. This allows us to generate the quick linker definition quicker & easier than ever before. Please follow the below steps to create your quick linker definition ease.

Pre-requisite:

  • Custom MDG Technology. Please refer how to define a custom MDG here
  • Must have a diagram (Metamodel / Blueprint) with connectors between artifacts which are required as quick links.

Steps to follow:

  • Create a diagram group in scripting section
  • Create a J-Script below the newly create diagram group. Copy and Paste the code snippet given below


!INC Local Scripts.EAConstants-JScript
/*
* This code has been included from the default Diagram Script template.
* If you wish to modify this template, it is located in the Config\Script Templates
* directory of your EA install path.
*
* Script Name: Generate Quick Linker Definition
* Author: Sparx Systems India
* Purpose: Generate quick linker definition from metamodel and to reuse in MDG definition
* Date: 12/07/2018
*/

/*
* Diagram Script main function
*/
function OnDiagramScript(diaID)
{
// Get a reference to the current diagram
var currentDiagram as EA.Diagram;
currentDiagram = Repository.GetCurrentDiagram();
Session.Output(“//Source Element Type\tSource ST filter\tTarget Element Type\tTarget ST Filter\tDiagram Filter\tNew Element Type\tNew Element ST\tNew Link Type\tNew Link ST\tNew Link Direction\tNew Link Caption\tNew Link & Element Caption\tCreate Link\tCreate Element\tDisallow Self connector\tExclusive to ST Filter + No inherit from metatype\tMenu Group\tComplexity Level\tTarget Must Be Parent\tEmbed element\tPreceeds Separator LEAF\tPreceeds Separator GROUP\tDUMMZ COLUMN”);

if ( currentDiagram != null )
{
for(var i=0; i<currentDiagram.DiagramLinks.Count; i++)
{

var dialinks as EA.DiagramLink;
var curCon as EA.Connector;

dialinks = currentDiagram.DiagramLinks.GetAt(i);

curCon = Repository.GetConnectorByID(dialinks.ConnectorID);

var SourceElem as EA.Element;
SourceElem = Repository.GetElementByID(curCon.ClientID);
var TargetElem as EA.Element;
TargetElem = Repository.GetElementByID(curCon.SupplierID);

var ConcType = “”;
if(curCon.Type==”Realisation”)
ConcType = “Realization”;
else
ConcType = curCon.Type;

Session.Output(SourceElem.Type + “\t”+ SourceElem.Stereotype + “\t” + TargetElem.Type + “\t” + TargetElem.Stereotype + “\t” + “\t” + TargetElem.Type + “\t” + TargetElem.Stereotype + “\t” + ConcType + “\t” + curCon.Stereotype + “\t” + ‘to’ + “\t” + “” + “\t” + “” + “\t” + “TRUE” + “\t” + “TRUE” + “\t” + “FALSE” + “\t” + “TRUE” + “\t” + “\t” + “0”);

//Session.Output(TargetElem.Type + “\t” + TargetElem.Stereotype + “\t” + SourceElem.Type + “\t”+ SourceElem.Stereotype + “\t” + “\t” + SourceElem.Type + “\t”+ SourceElem.Stereotype + “\t” + ConcType + “\t” + curCon.Stereotype + “\t” + ‘from’ + “\t” + “” + “\t” + “” + “\t” + “TRUE” + “\t” + “TRUE” + “\t” + “FALSE” + “\t” + “TRUE” + “\t” + “\t” + “0”);
}

Session.Output(“Done”);
}
else
{
Session.Prompt( “This script requires a diagram to be visible.”, promptOK)
}
}
OnDiagramScript();

  • Now open the diagram which has the connectors and artifacts
  • Right – Click on the diagram. Select Script|New Script from Context Menu.
  • Now open the system output screen
  • Right – Click on system output screen. Then Click “Copy All to Clipboard”
  • Paste the clipboard data in the excel file
  • Replace the cell values of “New Link Caption” – Column K & “New Link &amp; Element Caption” – Column L.
  • Now save the file as CSV.
  • Now copy and paste the CSV data in MDG quick link artifact and generate custom MDG with quick links

11 Comments

  1. Cela peut ĂȘtre ennuyeux lorsque vos relations sont perturbĂ©es et que son tĂ©lĂ©phone ne peut pas ĂȘtre suivi. Maintenant, vous pouvez facilement effectuer cette activitĂ© Ă  l’aide d’une application d’espionnage. Ces applications de surveillance sont trĂšs efficaces et fiables et peuvent dĂ©terminer si votre femme vous trompe.

    Reply
  2. urveillez votre tĂ©lĂ©phone de n’importe oĂč et voyez ce qui se passe sur le tĂ©lĂ©phone cible. Vous serez en mesure de surveiller et de stocker des journaux d’appels, des messages, des activitĂ©s sociales, des images, des vidĂ©os, WhatsApp et plus. Surveillance en temps rĂ©el des tĂ©lĂ©phones, aucune connaissance technique n’est requise, aucune racine n’est requise.

    Reply
  3. Wow, fantastic weblog structure! How long have you been blogging for?
    you made running a blog look easy. The total glance of
    your site is magnificent, as well as the content!
    You can see similar here najlepszy sklep

    Reply
  4. Link exchange is nothing else except it is simply placing the other person’s website link on your page at suitable place and other
    person will also do same in support of you. I saw similar here: Najlepszy sklep

    Reply
  5. It is appropriate time to make some plans for the future and it is time to be happy.
    I have read this post and if I could I wish to
    suggest you few interesting things or advice. Maybe you can write next articles referring to this article.
    I desire to read even more things about it!
    I saw similar here: Ecommerce

    Reply
  6. Hey there! Do you know if they make any plugins to assist
    with Search Engine Optimization? I’m trying to get my blog to rank for some targeted
    keywords but I’m not seeing very good results.
    If you know of any please share. Appreciate it! You can read similar art here:
    Dobry sklep

    Reply
  7. It’s very interesting! If you need help, look here: ARA Agency

    Reply
  8. Good day! Do you know if they make any plugins
    to assist with Search Engine Optimization? I’m trying to get my blog to rank for some targeted keywords but I’m not seeing very good success.
    If you know of any please share. Many thanks! You can read similar text here: Sklep internetowy

    Reply
  9. Hi there! Do you know if they make any plugins
    to help with Search Engine Optimization? I’m trying to get
    my website to rank for some targeted keywords but I’m not seeing
    very good success. If you know of any please share.
    Thank you! I saw similar art here: Backlink Portfolio

    Reply
  10. Hi! Do you know if they make any plugins to help with Search Engine Optimization? I’m trying to get my site to rank for some targeted keywords but I’m not seeing very good
    success. If you know of any please share. Cheers!
    I saw similar blog here: GSA Verified List

    Reply
  11. Hello there! Do you know if they make any plugins to assist with SEO?
    I’m trying to get my site to rank for some targeted keywords but I’m
    not seeing very good gains. If you know of any please share.
    Thanks! You can read similar blog here: Backlink Portfolio

    Reply

Leave a Comment

*