UML & SysML modelling languages

Expertise and blog articles on UML, SysML, and Enterprise Architect modelling tool

version francaiseTwitterVideos UMLChannel SparxSystems EA YouTubeLinkedIn

archimate logo

EA User Group London 2017

I attended a useful and interesting training on EA and Archimate 3 from Gillian Adens (Hippo Software) at the London's EA User Group today. Defining Archimate business roles, Gillian pointed out that EA does not let one disable the rectangle notation on all selected roles. A right click on each business role to select Advanced > Disable Rectangle Notation being time consuming, I felt this could easily be achieved via a handy script.

This article shares the script code I wrote during the training session...

Early this month, I published a script to sort elements from a selected package by the alias name. This article provides another project browser script that finds and selects the classifier for an instance or a class attribute, or the property type for a SysML port or part.

sparx-enterprise-architect-project_browser_script_sortbyalias_running result

Important:

  • This script has been updated on the 1/09/2014 to resolve the case where elements in the package have an empty alias.
  • Features from this script have been enhanced and are now maintained in eaUtils Sparx add-in; please click here for more information.

I recently imported a number of requirements in my Enterprise Architect project with the following details: title, reference (stored in the requirement's alias), and description. By default Sparx Enterprise Architect sorts requirements within a given package by the element's name in the alphabetical order. When a package contains various types of elements (e.g. classes, interfaces, use cases, etc.), each group of elements from the same type is sorted separately.  

Going back to my requirements, I needed to sort them by the alias value e.g. REQ-TEST-001, REQ-TEST-002, REQ-TEST-003, etc. On the following screenshot, I illustrated on the left hand side the default sorting order in Enterprise Architect project browser, and on the right hand side the list of requirements in the desired alias order. 

sparx enterprise architect project browser sort by script

This article explains how to create and use an Enterprise Architect Project Browser script aimed at sorting elements from a selected package by the alias name. An additional script is provided at the end of the article to sort elements by a dedicated Tagged Value called "SortingOrder".

A colleague recently enquired about a simple way to run a batch import of several XMI files into an Enterprise Architect project. The client's project required importing a rather large number of XMI files, created from various Enterprise Architect projects via the standard XMI export (note : each file store an extraction in the XMI format from a selected part of the modelling project). Having to import each XMI file is too cumbersome, and Enterprise Architect's existing "Batch XMI Import" is limited to controlled packages i.e. involving a VC repository like SVN set up with the current project.

This article explains how to create in your Enterprise Architect project a VBScript that can import a batch of XMI files, located on a local or networked drive, within a selected package from the browser.

Important : this script is intended to easily run a one-off import of a large number of XMI files into a single target package of an EA project.