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 ... 8
I've started making heavy use of the new Image Asset element to bring in mock-ups created by our development team so I can link them to BPMN activities.
E.g. while doing the activity the actor is interacting with the IT solution using the interface.

Because they are NOT using Sparx EA for the mockups (using Balsamiq), I'd like to:

  • Export screens from Balsamiq
  • Import them in to Sparx EA (and store in Sparx EA) using the file names as the Element Name
  • If they later update
  • Export screens from Balsamiq
  • Run a script in EA that replaces the images in Sparx with the new images, using the file/element names for matching

Does the API have a feature for this, or one planned for this?
I was hoping for something similar to the Element.LoadLinkedDocument(string Filename) function.
E.g. LoadLinkedImage(string Filename)


General Board / Re: EA13 image assets
« on: February 07, 2017, 12:38:16 am »
Thanks Paolo, I thought that might be the case, but at the moment I haven't found a GUID that it matches up with.

The image asset is stored in t_document,
  • docID = {5E923B0A-B2C7-4761-9739-480DA752DCAE}
  • Style = {19435D98-9499-4cbb-96B7-C58D39CB8DF7}
  • ElementID = {5E923B0A-B2C7-4761-9739-480DA752DCAE}

In t_object,
  • the image asset Element GUID = {5E923B0A-B2C7-4761-9739-480DA752DCAE}
  • the Class Element with the updated appearance has the GUID {34B7553B-BF89-48a1-936B-0C635E78DB37}

There is also an XREF entry for the image asset:
In t_xref, the XrefID = {A21E578D-6DCE-41a7-8986-B42E417636DB}, client = {5E923B0A-B2C7-4761-9739-480DA752DCAE} (the client is the GUID of the asset Element)

The GUID of the diagram = {DE664BE3-F69F-4259-A0B2-7F8FFDCEB351}

So I'm not sure where 608EC5C1 was pulled from.

I put the same Class Element on a different diagram and set it appearance to the same image asset and go a DUID of FFEED9EF

General Board / Re: EA13 image assets
« on: February 06, 2017, 12:26:59 pm »
Hi Guillaume, I've also been experimenting with image assets, this is what I've found so far:

  • You can use the image assets directly in diagrams, they seem to be treated as class elements.... I've been in contact with Sparx, and they don't recommend using image assets directly in you diagram, the intent is to use them as an alternate image
  • You can use image assets as the "alternate" image for an element, but you have to set this for each diagram the element appears in... a bit of a pain
  • Once you set the image asset as the alternate image, you can update the image linked to the image asset and all you diagrams and elements pointing to it are updated.

What I'd like is a way to set the image asset as the "default" appearance for the element, but that doesn't seem to be possible yet.

So I'm trying to see if I can make a script work around for step 2.   
At the moment this is what I've figured out:
  • Each image file is stored in the table t_documents that references the GUID of the image asset Element
  • Each image asset element is stored in the t_objects table (like all other elements), element's GUID = {5E923B0A-B2C7-4761-9739-480DA752DCAE}

When you want to use the image asset for an element in the diagram:
  • You select an element, then select "appearance->select image asset as alternate image
  • Sparx EA updates t_diagramobjects and the ObjectStyle field for the diagramobject representing the element: DUID=608EC5C1;
  • Sparx EA then updates t_diagram and the StyleEx field for the diagram: OPTIONS_608EC5C1=AIG={5E923B0A-B2C7-4761-9739-480DA752DCAE}:;

So it seems to be that a script could be created that would work by:
  • Select an Element in a diagram that has already had it's appearance linked to the image asset
  • The Script identifies all diagrams that contain the Element
  • The Script would update the in each diagramobject for the Element
  • The Script would update the diagram.styleEx for each diagram contain an diagramobject for the Element

Will experiment and post once I figure things out.
What I don't know right now is how Sparx EA generates the value DUID=608EC5C1;

Hi Query, I've discovered that calling Session.Prompt actually pauses script execution.
I already have a similar script working where I select Diagram Objects 

I use that script to select a set of Diagram Objects, then select Elements in the Project Browser, and then the script creates a trace relationships between the Diagram Objects and the Selected Elements.  The script creates the a trace relationship in the correct direction based on Element Types + Stereotypes.

I find this quicker than dragging to the diagram, or using a matrix in many cases.

I'd like to do the same between the Package Browser and the Package List View.


For one of my scripts I'd love to be able to do the following:

  • In the Package Browser, select Package "A"
  • View Package "A" as a List (Package List View)
  • Navigate to Package "B"
  • Select some Elements in Package "B"
  • Run my script
  • Script uses Repository.GetTreeSelectedElements() to get the Elements I selected in Package "B"
  • Script uses "Session.Prompt" to pause and ask me to select items from Package "A"
  • I go back to the Package List View from step 2
  • I select Elements in the Package List View
  • Script uses ????? to get the Elements I selected in the Package List View, fromPackage "A"

I don't think this is supported right now, but I thought I'd ask.

By the way, if you didn't know already, you can open multiple "list views" at the same time, and drag and drop elements between them... handy for organizing things in Sparx EA.

General Board / Re: Image Assets in Generated Reports
« on: January 10, 2017, 04:32:43 am »
Hi Roy,
I don't think we're talking about the same thing.
The user guide mentions linking to an asset in my notes, or a linked document.

I want to know how to reference an asset's image directly in an RTF reporting template so that when the report is looping through the image assets in a package, the images will be displayed in the report.

Package 1 = P1

Select P1, create documentation

Report generates.
Header 1 = P1.Name

Header 1.1 = Asset1.Name

Header 1.2 = Asset2.Name


General Board / Re: EAUML::trace and Relationship Matrix
« on: January 07, 2017, 11:09:49 am »
Thanks Simon, I didn't realize that the stereotypes for connectors were also being stored in the t_xref, will run your fix.

General Board / Image Assets in Generated Reports
« on: January 07, 2017, 10:02:57 am »
We've started using Image Assets to import Interface Mockups created in an external tool in to Sparx EA.

I created several image assets by dragging some PNG files on to a diagram, and selecting "Image Asset" as the element type.

But I'm having some issues getting them to show up in reports:
"They can also be used in documentation by inserting hyperlinks to the Image Asset element."

I tried:
package >
  element >
  child elements >
< package

And that didn't work.
Anyone have any success yet?

My workaround is creating a diagram under the image asset to include the image.

General Board / Re: EAUML::trace and Relationship Matrix
« on: December 21, 2016, 02:47:35 am »
I had the same issue, and this is the fix info from Sparx EA:

"We had a similar report and found that the issue was caused by a stereotype which had been defined in the project "UML Types". Please try the following...
Open the project which is having the issue, then open the UML Types dialog (via "Configure > Reference Data > UML Types"). In the list of stereotypes, locate the "EAUML::trace" stereotype (see attached) and delete it. Trace connectors should be created correctly (if not, please let us know)."

For trace relationships that you've already created, that have the wrong stereotype, I wrote a quick jScript script to fix them.

var updateSQL = "UPDATE t_connector SET t_connector.BTM_MID_LABEL = '«trace»', t_connector.Stereotype = 'trace' WHERE t_connector.Stereotype = 'EAUML::trace'"

General Board / Dyanamic Documents crash EA?
« on: December 21, 2016, 02:40:59 am »
I was really hoping to make use of the new Dynamic Documents feature to improve the readability of information contained in my model.
Unfortunately every time I try using one, EA stops responding, I'm using EA 13.09.

Just wondering if this is isolated to me, or if others are having the same issue.
I'm sure this was working on an earlier version of 13, but I don't really want to role back.
Tested on both our Oracle repository, and a local MS-Access EAP file, using a "reqirement" element with no stereotype.

Seems to be an error introduced in Sparx EA 13

When I generate a report (docx), the bookmark for an Element section is being placed at the "end" of the Element instead of the beginning.
Running the same report with the same template on Sparx EA 12.1.1224 correctly places the bookmark at the beginning of the Element section.


In Sparx EA 13.09 and 13.08:
Element 1 - start
Element 1.1 - start
Element 1.1 - end - bookmark for Element 1.1 is here (guid)
Element 1.2 - start
Element 1.2 - end - bookmark for Element 1.2 is here (guid)
Element 1 - end - bookmark for Element 1 is here (guid)

In Sparx EA 12.x:
Element 1 - start - bookmark for Element 1 is here (guid)
Element 1.1 - start - bookmark for Element 1.1 is here (guid)
Element 1.1 - end
Element 1.2 - start - bookmark for Element 1.2 is here (guid)
Element 1.2 - end
Element 1 - end

Also reported through the official bug reporter.

Bugs and Issues / Re: Image Asset: Show Owned Image fails after update
« on: November 29, 2016, 08:32:17 am »
On further testing, this only seems to be an issue for images generated from MS Powerpoint slides, images from other sources work fine.... weird.

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.

Pages: [1] 2 3 ... 8