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.

Messages - stevesavage

Pages: 1 [2] 3 4 ... 8
Bugs and Issues / Image Asset: Show Owned Image fails after update
« on: November 29, 2016, 07:57:45 am »
Started experimenting with the new Image Asset, really liked what I saw at first, and could see me using this for linking screen mockups to activities.

Using Sparx EA 13.08 on Windows 7.

Create an image asset by:
1. Dragging a .png file on to a diagram
2. Select "as image asset"
3. Select the new image asset on the diagram, right click and check "Show Owned Image"
4. Diagram now shows the "image", perfect for what I need.
5. Select the new image asset on the diagram, right click and check "Update Stored Image"
6. Select a different PNG file
7. Select the new image asset on the diagram, "Show Owned Image" is now unchecked
8. Tried checking "Show Owned Image",  stays unchecked

1. Dragging a .png file on to a diagram
2. Select "as image asset"
5. Select the new image asset on the diagram, right click and check "Update Stored Image"
6. Select a different PNG file
7. Select the new image asset on the diagram, right click and check "Show Owned Image"
8. No change, "Show Owned Image" is still unchecked

Will keep trying with some other variations to see what's going on.

General Board / Using DocumentGenerator in Document Fragments
« on: November 02, 2016, 04:05:11 am »
I know this has been around since 12.1, but I'm finally getting around to experimenting with this now, and it's showing a lot of promise of making more complex documents.
Has anyone else been experimenting with this?

Under Document Options -> Custom Query you can select Document Script, then select the script from your script library with the function you want to call (or select a script in the language you want to use, then write the function in the provided area)

E.g. I selected: "EAConstants-JScript"

Then defined my function in the provided area:

function createRTF(inElementID)
  var local = {};
  local.selectSQL = "SELECT t_object.Object_ID FROM t_object .....";
  local.selectedElements = Repository.getElementSet(local.selectSQL,2); // could also use Repository.SQLQuery and then pull from the XML
  local.documentGenerator = Repository.CreateDocumentGenerator();
  for ( local.i = 0 ; local.i < local.selectedElements.count ; local.i++ )
    local.element = local.selectedElements.GetAt(local.i);
    local.template = "VD-DMD-03-Data Dictionary (EN) Select-" + local.element.Stereotype;
  return local.documentGenerator.GetDocumentAsRTF();

Anyway, just playing with it now, will write a blog entry when I have more time.

General Board / Re: Listing the "visible" attributes in a diagram.
« on: October 25, 2016, 03:19:21 am »
Hi Steve,

I'm currently working on a mapping tool that will probably make this easier for you.
The project is at the stage that I have now a list of sponsors and I'm getting them to agree on a list of requirements. I'm hoping to have a first version ready before the end of the year.
For more information see

Another tool I mentioned is the EA Message composer which will allow you to create a subset of a model, selecting classes, attributes and associations you are interested in. The subset model keep complete traceability to the original model. That might be useful in your situation as well.


Thanks Geert, will take a look.  For now I created a script that links the Business Activity to all the Attributes in the Class, I think just delete the ones I don't want.   E.g. Select Activity, run script, prompted to select one or more classes, prompted to enter the type and stereo type of the connector you want, then script links all the attributes.  I then delete the ones I don't want.   Not the best, but still manually faster than creating them one at a time.

General Board / Re: Listing the "visible" attributes in a diagram.
« on: October 23, 2016, 12:59:05 am »
It's not so much how it is stored that bothers me, but the fact that the information is only present in diagram.

One of the first thing I tell people when I'm giving a course is that there is a difference between diagramming (like in Visio) and modelling (like in EA).
I then tell them that with modelling I can delete all of my diagrams and still have all the information; because a diagram is merely a view on the model, and of course a handy tool to communicate a part of the model amongst us humans who are not really good at reading a model without diagrams (as opposed to computer programs, they don't need the diagrams at all)


You're right Geert, I have used the visibility approach mainly when I need to create a viewpoint for a specific report where I only wanted to include a subset of the relationships.

But I realize now, in this case (Business Activities -> Class.Attribute) I do want to explicitly model the relationship.

So what's the best approach?

I can see two options:
  • A connector + link to element feature to link the Business Activity to each and every Class.Attribute
  • Copy the Attributes to the Business Activity

The first option is probably the most "pure", but
  • we all know that Sparx stores the GUID's for the attributes in an annoying way, so reports that need to list the associated attributes will need a custom query (doable).
  • traceability only shows to the Class, not to the Class.Attribute, but Element.Browser does show the relationship to the Attributes under Linked Features

The second option only works because of what I mentioned earlier in the discussion, that all the copies of an attribute point to the same "classifier" element. 
  • this would explicitly list the attributes under the activity
  • but isn't as clear if the activity needs to link to multiple classes (I think this is the deal breaker).

I'm now leaning towards using the first option.

I just wish I could do ctrl+drag the attributes from the class to the activity and be prompted:
  • Link target to Source.Attributes
  • Copy Attributes and Link to Source.Attributes

The first option would simply link the Business Activity to the set of Class.Attributes instead of me having to create the links one at a time using Link Element Feature.

The second option would be more useful for mapping attributes explicitly to other attibutes

Geert, I know you have made several interface addons, have you created something to simplify linking to specific attributes?

General Board / Re: Listing the "visible" attributes in a diagram.
« on: October 19, 2016, 04:26:24 am »
Now that I know how the information is stored I've been thinking the same thing.

At the moment my domain model is a class diagram, where each attribute is defined by an element.

E.g. The Element "NOx Emission Intensity" defines what NOx Emission Intensity is, is stereotyped as a DD_Number (data dictionary number), and has tagged values for basic data quality rule such as min precision, max precision etc.

The Class "Test Result" has the Attribute "NOx Emission Intensity", the Attribute references the Element "NOx Emission Intensity" as it's data type.

I have a Business Activity for updating the test.   At the moment the business activity is linked to the Class "Test Result" with the only relevant Attributes visible.
I think instead I'll copy the relevant Attributes so they appear as attributes of the Business Activity.  All copies will point to the same Element for their definition, so this could work.

Will experiment.

General Board / Listing the "visible" attributes in a diagram.
« on: October 19, 2016, 01:41:16 am »
For my projects I typically have a domain model with classes that define the overall data-set being created/modified/used by a set of business activities.
I have a diagram showing a BPMN activity + the one or more classes it's linked to, and then use the feature visibility so only the attributes that are relevant to the activity are visible.

In addition to this diagram, I want to list these "visible" attributes and their properties within my reports.  (at the moment people have to look at the diagram, and then find the info in the domain model report)

After a bit of searching I found how and where Sparx EA stores this information in the DB.
I had hoped it would be something simple in in the t_diagramobjects or t_xref.

Instead the list of visible or invisible attributes are in t_diagram.StyleEx

S_2B7534 = the element with the GUID {2B753453-3F2D-4a25-8D5D-DA8FAF0E4674}
S_6CC0D7 = the element with the GUID {6CC0D72C-086B-45e3-B6C7-A70D0AC8984A}

E8B177,838277 = the attributes under S_2B7534 that are hidden
32C749,671377,4517EB = the attributes under S_6CC0D7 that are visible

Why only the first 6 chars of the GUIDs are used, don't know, but hopefully will not cause issues.

To determine if the attributes listed are hidden or visible you have to look in t_diagramobjects
For Object_ID = 2 = {2B753453-3F2D-4a25-8D5D-DA8FAF0E4674} = S_2B7534 : t_diagramobjects.ObjectStyle, AttCustom=0
For Object_ID = 3 = {6CC0D72C-086B-45e3-B6C7-A70D0AC8984A} = S_6CC0D7 : t_diagramobjects.ObjectStyle, AttCustom=1

My current idea is to create a template fragment that calls a script that returns the recordset I need.
But before I go that route, I was wondering if anyone had created an SQL query that could actually tie all this mess together?

Suggestions and Requests / Re: Add support for Paste as unformatted text
« on: September 20, 2016, 01:11:30 am »
No problem, I plan to add another example on how you can make AutoHotKey behave differently depending on what part Sparx EA is currently in focus, e.g. the Diagram Pane, Project Browser, or Notes for example.

Suggestions and Requests / Re: Add support for Paste as unformatted text
« on: September 19, 2016, 10:07:43 am »
Thanks a lot. Can you elaborate on the usage of autohotkey and EA.

Hi Helmut, I've put a bit of an explanation on my blog,

Suggestions and Requests / Re: Add support for Paste as unformatted text
« on: September 07, 2016, 11:49:25 pm »
Made a workaround for this.
I use a program called AutoHotKey to automate some tasks in Sparx EA.  Mainly for creating new elements from text selected in notes/linked documents, or linking selected text to existing elements.

But, I've also setup the hot key ctrl + alt + v so I can paste unformulated text in to my notes.


      WinGetActiveTitle title
      if(instr(title,"Enterprise Architect"))
         Send ^v

General Board / Re: Modeling product variants
« on: September 01, 2016, 11:31:15 pm »
Anyone have practices to share to model product variants?   

For example, say you have 2 software components that are built with different localization settings and for different Operating Systems, this can be seen as two components:

  • componentA, and
  • componentB

Variation Point 1 is localization with variations:
  • English, and
  • Japanese

Variation Point 2 is operating system with variants:
  • Windows 10, and
  • OSX 10

For each component, there are four variants.  Example:
Component A, English, Windows 10
Component A, English, OSX 10
Component A, Japanese, Windows 10
Component A, Japanese, OSX 10

I expect the modeling concerns are common:
How do I model the variation points?
How do I parameterize (not sure if this is the appropriate term) the component configurations?
How do I view the resultant variant types.

If I understand correctly, I think I've had to deal with something similar.   
We have an application that has to support English, French and German, and runs on both Windows and Linux (we actually use java, but for this example assume that the code is OS specific).
I use UML in the following way:

  • If the code is identical, and the only change is the configuration it's initialized with I use components and instances
  • If the code is NOT identical, I model using different components, if I want to show that these components are of the same "type", I create a generic component of that type, and use the
    generalize relationship

Example:  I want to model a presenter component

I have a UML Component Element representing the Presenter (1), with an attribute for specifying the language config file.
I have another UML Component Element in the Windows Package representing the Presenter (2), where (2) is generalized by (1), so (2) inherits language attribute from (1)
I have another UML Component Element in the Linux Package representing the Presenter (3), where (3) is generalized by (1), so (3) inherits language attribute from (1)

Now I can create OS specific, or OS agnostic run-time diagrams.
If I don't care about the OS I create an instance of (1), and set the run-time value of the language config to French, English, or German.
If I do care about the OS, I create an instance of (2) or (3)

I have some scripts that I created using the Sparx API to help keep the diagram layouts in sync, e.g.
place and size all instances of the same element in the same way (select correct diagram, then select target diagram)
place and size all specialized elements of the same generalized element in the same way

In my notes and linked documents I often include links to elements in my repository.

E.g.  S5.1(a): [RP] is Responsible Person = True/False

Where S5.1(a) = a hyperlink to element.  <a href="$element://\{9BE72A54-C3C2-47d3-9FC3-B6B6A18DBABF\}>
When I generate a report, this hyperlink get's changed to: <a href="#BKM_B515ED4C_37E8_4728_ACA2_468C0C850EC6">

I'd like to generate an .rtf report that I then use as a linked document within Sparx EA
My clients can then load the document in EA and use the hyperlinks to "jump to" the linked objects.

Is there anyway to tell Sparx EA to leave the links alone when the document is generated?

Suggestions and Requests / Re: Add "summary break" support for notes.
« on: August 23, 2016, 04:46:22 am »
Quick and dirty script to show a "summary" for notes.  Only works for showing the notes in elements.  E.g. Feature and Compartment Visibility -> Element Notes. 
The script looks for 4 dashes in your notes, and sets the character limit to just before the dashes ----, will replace the ---- with null when I run my reports.

!INC Local Scripts.EAConstants-JScript
function OnDiagramScript()
   var local = {};
   local.currentDiagram = Repository.GetCurrentDiagram();
   if ( local.currentDiagram != null )
      // Get a reference to any selected connector/objects
      local.selectedObjects = local.currentDiagram.SelectedObjects;
      if ( local.selectedObjects.Count > 0 )
         for ( local.i = 0 ; local.i < local.selectedObjects.Count ; local.i++ )
            local.EADiagramObject = local.selectedObjects.GetAt(local.i);
            local.EAElementID = local.EADiagramObject.ElementID
            local.EAElement = Repository.GetElementByID(local.EAElementID);
            local.sNotes = local.EAElement.Notes;
            local.iSummary = local.sNotes.indexOf('----');
            if(local.iSummary < 0) local.iSummary = local.sNotes.length;
            local.sStyle = local.EADiagramObject.Style;
            local.iStart = local.sStyle.indexOf('Notes=');
            if(local.iStart >= 0)
               // remove the Notes character length parameter in the Style property.
               local.iEnd = local.sStyle.indexOf(';',local.iStart);
               local.sStyle = local.sStyle.substring(0,local.iStart-1) + local.sStyle.substring(local.iEnd);
            local.iStart = local.sStyle.indexOf('Formatted=');
            if(local.iStart >= 0)
               // remove the Formatted flag parameter in the Style property.
               local.iEnd = local.sStyle.indexOf(';',local.iStart);
               local.sStyle = local.sStyle.substring(0,local.iStart-1) + local.sStyle.substring(local.iEnd);
            // append the Formatted flag to the Style property.
            local.sStyle = local.sStyle + 'Formatted=1;';
            // append the Notes character length parameter to the Style property.
            local.sStyle = local.sStyle + 'Notes=' + local.iSummary + ";";
            local.EADiagramObject.Style = local.sStyle;
            // Session.Output(local.sStyle);
         // One or more diagram objects are selected
      Session.Prompt( "This script requires a diagram to be visible.", promptOK)


Suggestions and Requests / Re: Add "summary break" support for notes.
« on: August 23, 2016, 03:41:28 am »
Can I suggest using the notes for your summary and linked documents for complete documentation?

This will automatically do what you are requesting, and have the further advantage of allowing tables, nested lists, etc.

With version 13 this becomes even better, as there is a docked window for the linked document.

I'll look at trying that once we role out version 13... a bit of a training overhead with the interface redesign before we do that.  :-\

To give you an idea of the type of information I'm capturing, everything "before" the Schedule 5... is shown in the diagram, I'm using this to verify with clients that the fields listed for a report are all identified and captured in a data dictionary for the project.   The rest is there for reports and other walk through.

If they selected S5.4(a) subparagraph 34(1)(a)(i), a new Stack Test
The Date the Stack Test was conducted
S5.5(a)(ii): [CR] Confirmation that the regulations were satisfied
S5.5(a)(iii): [FU] Fuel Used for the Test
S5.5(a)(iv): [MU] Method used to measure NOx Concentration
S5.5(a)(iv): [RA] Identifier of Alternate Rule if used.  The Replaced Rule(s) were identified as part of the application for the Alternative Rule, and therefore do not need to be provided again.
S5.5(a)(v): [EI] NOx Emission-Intensity

Schedule 5: Classification Report Information Required
S5.5 The following information respecting a test on the boiler or heater referred to in paragraph 34(1)(a) of these Regulations conducted to determine its classification NOx emission intensity:
S5.5(a) for a stack test,
S5.5(a)(i) the date on which the stack test was conducted,
S5.5(a)(ii) confirmation that each test run of the stack test was conducted while the boiler or heater met the conditions set out in paragraphs 27(2)(a) to (e) of these Regulations,
S5.5(a)(iii) an indication as to whether the type of gaseous fossil fuel that was combusted during that stack test was natural gas or alternative gas,
S5.5(a)(iv) the method set out in subsection 28(1) of these Regulations that was used for the stack test to measure the concentration of NOx and, if an alternative rule as approved under subsection 113(1) of these Regulations to replace a rule set out in that method was used, an indication of that rule, as approved, and of rule it replaced, and
S5.5(a)(v) the classification NOx emission intensity of the boiler or heater, as determined by means of the stack test; and

Suggestions and Requests / Add "summary break" support for notes.
« on: August 19, 2016, 11:57:41 pm »
I'm finding that I'm making more use of the "notes" for an element in my diagrams.  Either directly in the body of the element or as a linked Text Annotation/Note.
It would be useful to be able to add a "text break" in to my notes where everything before the break is shown in the diagram, and everything after is hidden.

At the moment I adjust the character length for notes showing in the body of the element (Feature and Compartment Visibility -> Element Notes -> maximum chars)
But don't have a work around for linked Annotation/Note.

Bugs and Issues / Re: Missing horizontal scroll bar in EA v12
« on: August 04, 2016, 03:03:07 am »
Playing with the Sparx EA 13 Beta.... is there an option to enable manual scrolling?

"The presence of a horizontal scroll bar is actually determined by the Visual Style, available from the menu View | Visual Styles. For example, if you switch to the Visual Studio 2010 style, a horizontal scroll bar is displayed in the Project Browser. There is also an update planned, which will restore manual scrolling in the Project Browser for visual styles that only use the standard Windows scroll bars, such as Visual Studio 2008."

Pages: 1 [2] 3 4 ... 8