Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - pgoes

Pages: [1]
1
Suggestions and Requests / submenu's in diagram scripts context menu
« on: February 16, 2017, 02:29:42 am »
I would like to see in a next version of EA submenu's in the scripts context menu.

If I have now 3 diagram maps with diagram scripts the script menu is one long list with scripts.
It would be nice if it could be:

Scripts
      |
      |-- find scripts
      |        |
      |        |- findscript 1
      |        |- findscript 2
      |
      |--  Creation scripts
      |        |
      |        |- creationscript 1
      |        |- creationscript 2

2
Automation Interface, Add-Ins and Tools / get classifierGUID of swimlane.
« on: October 24, 2016, 07:41:41 pm »
Hi all,

i'm try-ing to get the classifierGUID of an element related to a swimlane, but the API always returns 'Undifined' Can one of you tell me what goes wrong or is this a bug in EA.

Script:

   var currentDiagram as EA.Diagram;
   currentDiagram = Repository.GetCurrentDiagram();

   if ( currentDiagram != null )
   {
      //##################### do diagram things

         if (currentDiagram.SwimlaneDef != null)
         {
            Session.Output("Simlane def is not null");

         }
         
         Session.Output("Number of swimlanes = " +  currentDiagram.SwimlaneDef.Swimlanes.count);
         for (i = 0; i < currentDiagram.SwimlaneDef.Swimlanes.count; i++)
         {
            CurrentSwimelane = currentDiagram.SwimlaneDef.Swimlanes.Items(i);
            Session.Output("Properties Swimlane " + i);
            Session.Output("--------------------------");
            Session.Output("Name : " + CurrentSwimelane.Title);
            Session.Output("Classified GUID : " + CurrentSwimelane.ClassifiedGUID); // this returns always Undefined.
            ClassifierObject = Repository.GetElementByGuid(CurrentSwimelane.ClassifiedGUID);
            if (ClassifierObject != null)
            {
               Session.Output( "Name of Classifier :" + ClassifierObject.Name);
            }
            else
            {
               Session.Output( "classifier object not defined. :");               
            }
            Session.Output("Width : " + CurrentSwimelane.Width);
            Session.Output("" );
            
         }
      }
   }

Thanks in advance,

peter.

Pages: [1]