Recent Posts

Pages: 1 ... 8 9 [10]
I don't think this is the best place to search for regex help.
Have you tried StackOverflow?

General Board / Re: Archimate Open Exhcnage format and EA
« Last post by Geert Bellekens on November 10, 2017, 04:19:46 am »
On a sequence diagram you should be using instances, not classifiers.
So you can reuse as many times the same entity as long as you create different instances of that entity.

General Board / Archimate Open Exhcnage format and EA
« Last post by Begbie on November 10, 2017, 03:25:36 am »

Just wondering if anyone else had run into problems when trying to transfer Archimate 3.0 Diagrams from Sparx EA into any other Archimate tool? We have encountered a huge problem with Sparx in that it does not allow multiple instances of the same objects on a diagram.

In a sequence diagram, we have several roles all receiving the same information, and each of the roles carries out the same series of actions in its response. However, when translating these in to Archimate, the series of actions become Business Processes and should be reused for each of the different roles. Sparx wont allow it, we have to create a series of identical Business Processes for each role, which when exchanged into another archimate tool using the open exchange format creates duplicates which we do not want.

Does anyone have any ideas how we can get round this or whether Sparx are aware of this and will be looking into allowing reuse of objects in the Archimate language?

Thanks in Advance.

I am working on a large project, and I need to copy/paste text from several sources into element notes and tagged values.  Many sources are MS Word and Powerpoint documents.  This text contains a lot of formatting characters; I tried to clean them out by pasting into MS Notepad before pasting onto EA; using Excel CLEAN function, and using Notepad++ to find and replace any weird characters.  Still a lot of junk got thru.  The Sparx spell checker ignores these characters.  Main issue for now is that CSV export displays wrong then imported to MS excel: notes and tagged values fields go to the wrong cells and screw up everything else.  I need top quality CSV export because I use it to make tables/slides for presentations to management; also this is a large long term project.
(I export from EA as tab delimited as that is a character that just should not appear in any of the text.)

My preferred cleanup strategy would be to:
1. Export the whole model to XMI
2. Open the XMI with Notepad++
3. Use the 'search and replace' with regex to replace all this junk with empty strings. 
4. Save the cleaned XMI and import into EA in a new project and delete the old project

I googled around but cannot find the regex expression that will safely leave all XMI that EA needs safely untouched, but take out all the junk characters from notes and tagged values.  I tried several expressions but they either leave several junk characters in or they destroy some of the tabs and line feeds that were legitimate.  Example (hope this displays correctly):
  –  â
and many more

If anyone can provide to me I would be very grateful!  Thanks!!

p.s. Google also brought up an approach to use unix tr command as: tr -cd '\11\12\15\40-\176' < file-with-binary-chars > clean-file.  Anyone has an idea if this would be a better strategy?
I created a custom diagram type in an MDG.

When I use the MDG, I can select my custom diagram type when I create a new diagram
  • The new diagram does not get a customized type - it is still just "Component"
  • The new diagram does not get a customized stereotype - it is still blank in the stereoype
  • If I try to change the stereotype in the properties field, my new stereotype does not show up
  • The new diagram does not get a customized stereotype (in diagram peoperties window) - it is still blank in the stereoype
If I go to Design/Diagram/Manage/Change type... - then I can actually choose my new diagram type, but I still don't see any change in the diagram's type og stereotype.
The diagram pane's title bar does show the new customized stereotype though (<Steretype> diagram: <name>
EA also presents the associated toolboxes correctly
Does EA not set diagram type and stereotype in the usual fields (Diagram_Type and Stereotype) for a customized diagram?
I can see that it does include the name of my customized stereotype (CityMap) in the field StyleEx:
Automation Interface, Add-Ins and Tools / Re: Script driven Fragment with new lines
« Last post by philchudley on November 10, 2017, 01:44:18 am »
Hi All

I have solved the problem

The delimiter to be used is <p> (HTML Paragraph)

The string representing the custom field is added to the XML with a formatted attribute with a value of 1


Automation Interface, Add-Ins and Tools / Script driven Fragment with new lines
« Last post by philchudley on November 10, 2017, 01:18:46 am »
Hi All

I am developing a script for a documentation template fragment.

Part of this involves processing a list of GUIDS from a refGUIDList tagged value, getting each GUID is easy, but as part of the XML returned which contains several custom fields, I wish to return a CustomField called, say ELELIST which is a newline delimited string of element names

Does anyone know how to achieve this?

I have tried using \n as the delimiter as well as &#13;&#10; all are simply ignored during documentation generation and all element names appear on a single line of text.

Automation Interface, Add-Ins and Tools / Re: currentPkg.Elements.Count
« Last post by BruceTOGAF2 on November 09, 2017, 10:06:10 pm »
As usual Geert, your inspiration has helped me fix the problem.  The following function works well.

' Author:   Bruce Singleton
' Fixer: Geert Bellekens
' Date:     09/11/2017
         var theToPackage As EA.Package;
         theToPackage = taggedValueGetPkg("01-Absolute_Number", Absolute_Number, "heading");
'------------------------------------------------------------- */
function taggedValueGetPkg(property, value, versionVal)  {
   var soughtPkg as EA.Package;
   sql = "select obj.Object_ID AS OBJ_ID from t_objectproperties prop, t_object obj ";   
   sql = sql + "WHERE prop.Object_ID=obj.Object_ID ";
   sql = sql + "AND obj.Object_Type='Package' ";
   sql = sql + "AND prop.Property='" + property + "' ";
   sql = sql + "AND prop.Value='" + value + "'";
   s = Repository.SQLQuery(sql);

   var myIDs = xmlColumn( s, "OBJ_ID");
   for ( var i = 0 ; i < myIDs.length; i++ ) {
      var currentElement as EA.Element;
      currentElement = Repository.GetElementByID(myIDs);
      if (currentElement) {
         if (currentElement.Version == versionVal) {
            var soughtElement as EA.Element;
            soughtElement = currentElement;
            var soughtGUID = soughtElement.ElementGUID;
            soughtPkg = Repository.GetPackageByGUID(soughtGUID);
            return soughtPkg;

   return soughtPkg;

Thank you.
Automation Interface, Add-Ins and Tools / Re: currentPkg.Elements.Count
« Last post by Geert Bellekens on November 09, 2017, 09:57:51 pm »
The easiest solution is to use Repository.GetPackageByGUID with the guid of the returned package element.

Sparx doesn't guarantee this, but I've never known it to fail.

Otherwise you'll have to get the package ID from the miscdata (0 I think) and then use that to get the package object.

Automation Interface, Add-Ins and Tools / Repository.SaveImageToPath
« Last post by Geert Bellekens on November 09, 2017, 09:54:54 pm »
I just found this operation on the EA.Repository class, but it doesn't seem to be documented.
Does anyone have any idea what it does?

Pages: 1 ... 8 9 [10]