Sparx EA: Displaying Tagged Values on Diagrams


Overview

I’ve been working a lot with Sparx Enterprise Architect and ArchiMate over the past few years, and although I am a big fan of formalized modelling using ArchiMate I’ve found myself frustrated with some of the limitations of the Sparx EA tool.

Over a small series of posts I’m intending to share a few of the tricks I’ve developed over time to address these frustrations.  These posts are fairly technical in nature, and address the usage of Sparx EA as an architecture tool, as opposed to the practice of defining the architecture itself.  The other posts in this series are below;

Exposing Tagged Values on Diagrams

One of the issues that I struggle with is being able to surface a lot of the rich meta-data captured within the model that isn’t able to be displayed as part of elements. For each element (and to a lesser degree each connector), a number of attributes are captured as notes and tagged values. While the primary use of these attributes is for analysis of the model itself (often outside of Sparx diagrams), it is often desirable to be able to display these as part of a view.

Unlike the standard UML models within Sparx which allow these attributes to be displayed as part of the Feature and Compartment Visibility options, the shapes used to display ArchiMate elements do not provide this option. As shown in the diagram below, enabling the info view will allow the display of base properties such as Stereotype and Notes, however Tagged Values cannot be displayed at all.

To work around this limitation, I’ve opted for a compromise whereby the tagged values can be displayed as a separate Note element on the same view. Obviously the same technique could be extended to also display the associated element notes or other properties as required.

A Note on Probably-Unsupported-Features

This script makes use of a couple of features in Sparx EA that are probably unsupported, so may change between versions. I’ve been working in 13.5, but have not tried this script in other versions.

  1. The script assumes that for connections from a note to a connector, the connector ID is stored in the PDATA4 field on the database (exposed as MiscData[3] on the object model).
  2. The script assumes that the StyleEx string “NS=1;” will set the Note style to “Memo”.

Implementation / Execution Method

  • Download the “Populate Note with Tagged Values” script 
  • Load the “Populate Note with Tagged Values” script to Sparx Enterprise Architect within a group that allows targeting of elements
  • Create a note element on a diagram, and create a connector from
    the note to the target element or connector
  • Select the note and execute the “Populate Note with Tagged Values” script.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s