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 - Dermot

Pages: 1 ... 37 38 [39] 40
Hello TLC,

When you say 'Project Name', what are you refering to - The root-node of the packages, the repository name or ...?

Hello TLC,

Unfortuantely I cannot send an XMI copy of a template-package across the forum, however below is list of the steps to create a Virtual-template-Package:

Creating a Master Document:
The Master Document defines the general template for the Table of Contents and Headers and Footers etc.
1)      Open the Tagged Values view  (Ctrl-Shift+6)
2)      Create a Master Document Package using either:
      Under a Package Create a new diagram of type: Model document
      From the toolbar select: Documentation
      On an existing Diagram:
      From the Toolbar select: Toolbar | More tools | Extended | Documentation
3)      Drag a Master Document Package onto the diagram. This will prompt for a package name and will create a Package and a Diagram.

4)      Open the created Diagram (the Toolbar will now display Documentation).
5)      From the Toolbar Documentation - drag on a Model Document Element. Give the Element an appropriate name (e.g. the sub-document section name: “Requirements”).
6)      Select the Element:
      In the Tagged Values window; under RTFTemplate;  set the Template using the drop-down.
      Set the packages to report or  a filter:
•      Drag the packages to be reported onto the Element
•      Set a filter in the Tagged Values window by creating a Tagged Value of type SearchName, then  select an existing Search in SearchName.  
•      If the Search requires a filter value, create a Tagged Value of type SearchValue and set the Filter Value in this Tagged Value.

Repeat steps 5- 6 for each new sub-document required.

I hope this is of help.


The latest version of EA – 7.1 available for download, supports creating Virtual documents that contain multiple model templates.

You can combine several Model Documents under a Master Document package element.
Each Model Document element provides a separate template; for example, an Actor Section for the Actors and a Use Case template for a section on Use Cases. The Master Document links any number of Model Documents into a single generated document, and provides headers and footers and a central table of contents.



Reporting on Tagged Values is dependant on where the Tagged Value is – i.e. it could be in: Package/Element/Element.Attribute etc.

For each Section in the RTF report editor (Package/Element/Element::Attributes etc. )
There are two options for reporting Tagged Values:
1)  Using the Section (i.e. Element::Tagged Values)
2)  Using “Valueof” – (in the Element field list – for Element::Tagged Values)
The “ValueOf”  is last entry.  This requires the tagged Value to be named.  

Option 2 would probably be the easiest to use if you require the data be in a simple form and placed early in the report.

The Automation Interface suports the generation of RTF reports using:
 - RunReport (String, String, String)

For the details on this command see:

The latest version of EA - version 7.1, now supports scaling diagrams across multiple pages in RTF generated reports.  
See the entry from RoyC above, as well as:

Automation Interface, Add-Ins and Tools / Re: documentation rtf fields
« on: March 20, 2007, 05:15:27 pm »
The {Element.Tag} field does output the Element.Keywords data.  I am not sure why it has that name - I will pass this on to see if it should be corrected.

Automation Interface, Add-Ins and Tools / Re: How to use CSV-Import
« on: August 27, 2006, 06:17:05 pm »
In the CSV import specification you do need to specifiy the Element Type that you are going to create in EA.

So your "Select element field:"
- has to have at least : Name, Type

The Element Type can be:
Action, Activity, ActivityPartition, ActivityRegion, Actor, Artifact, Association, Boundary, Change, Class, Collaboration, Component, Constraint, Decision, DeploymentSpecification, DiagramFrame, EmbeddedElement, Entity, EntryPoint, Event, ExceptionHandler, ExitPoint, ExpansionNode, ExpansionRegion, GUIElement, InteractionFragment, InteractionOccurrence, InteractionState, Interface, InterruptibleActivityRegion, Issue, Node, Note, Object, Package, Parameter, Part, Port, ProvidedInterface, Report, RequiredInterface, Requirement, Screen, Sequence, State, StateNode, Synchronization, Text, TimeLine, UseCase

I hope this is of help.

Hello Gary,

It is suprising to hear that this code does work under Word 2003.  We did test it for Word 2000, 2002 & 2003.  We ended up using the library for Word 2000 as this was the one that seemed to cover all the versions best.

If you are looking at working on this in VB,  I would reccomend you reset the Word Object library to the Word 2003 - "Microsoft Word 11 Object library" See: for a graphical picture of where to set this in VB 6.

I assume you are already aware of the location for the source code: ttp://

I hope this is of help.


Automation Interface, Add-Ins and Tools / Re: Refresh Packages
« on: September 08, 2004, 05:28:48 pm »
Try using ReloadDiagram()  


I hope this is of help.


This is defined in a Element under Gentype See:

and search for Gentype.

I hope this is of help.

Automation Interface, Add-Ins and Tools / Re: ER DIAGRAM
« on: January 26, 2004, 04:54:45 pm »
EA supports creating UML data diagrams. To import a schema from an existing SQL database - create an ODBC connection to your SQL Database.

Create a package and a diagram for your data schema. Then from the main menu, select Project | Database Engineering | Import Schema from ODBC.  This will import the schema into the diagram.


Just an update on that - use the ODBC string defined in EA when doing:
File | Open
Copy the text from the ODBC link in the field: Project to Open
Use this text as the ODBC string in Repositpory.OpenFile()

Repository.Open( ) is the command for opening a repository in the Automation Interface .  The parameter for this can have a file path or an ODBC string as the parameter.  An example of this is attached below.

This can be further automated by calling your application from within EA and passing across a parameter in the call.  See:
There is an example code using this type of call in:

I hope this of help.

Sub Main()
   Dim rep As EA.Repository
   Dim Package As EA.Package
   Dim aPackageGuid As String
   Dim aProject As EA.Project
   Set rep = New EA.Repository
  ‘ ODBC path ..
   rep.OpenFile "SQLREPOS ---
      DBType=1;Connect=Provider=MSDASQL.1; _
      Password=xxxxx;Persist Security _
      Info=True;User ID=xx;Data Source=xxxxx"
   ‘ File path
   'rep.OpenFile "C:\Program Files\Sparx" + _  
   Set Package = rep.Models.GetByName("Support")
   aPackageGuid = Package.PackageGUID
   Set aProject = rep.GetProjectInterface()
   aProject.RunHTMLReport aPackageGuid, "C:\temp", "BMP", "", "htm"
   Set rep = Nothing
End Sub

This was based on request for gettting inforation on Formal-Requirements across into the Test Cases of that object.

This is short piece of Automation Interface code that gives an example of:
- making updates to the repository
- Calling an application using parameters from EA

It needs to be called as an executable from EA.  There are details on the web site for calling an application from EA -

These details would differ for this application:

- The application Name: Requirements
- The command line would be: c:\{YourDir..}\Requirement.exe
- The Arguments would be:  $f, $p

On running EA - open the diagram with the Formal Requirements then select the installed application from the EA menu - Tools | Requirements.  This will give a simple msgbox asking if want to copy the name and notes of each Requirement element in that package.  On selecting 'Yes' it simply copies the Name and Details into a Test Case.

This is simple code.  It only checks if the records already
exist - if so it does not try to add the same name.

Here is the code below:


Option Explicit
Public EARepos As EA.Repository        ' The instance of an EA repository

Private Sub Main()
   'Get the command line parameters, Load the Repository
   'and set some defaults
   Dim Package As EA.Package
   Dim lPackageId As Long
   Dim EafileName As String

   'set what will be parameters in the procudure call
    If Len(Command) > 0 Then                    ' See if there are any arguments.

       ' The Ea repository location             'possible EA Arguments $f, $p
       EafileName = GetParams(Command, 0)
       ' get the package Id
       lPackageId = Val(GetParams(Command, 1))
       'No Arguments may not be running from EA..
       MsgBox ("Please set this up to be called as an application by EA passing the $f, $p arguments.  See:")
   End If
   OpenRepos (EafileName)                   'load up with sepcified path
   Set Package = EARepos.GetPackageByID(lPackageId)
   ScanElements Package
End Sub

Sub ScanElements(Package As Package)
   Dim idx As Integer, oElement As Element, PackageName As String
   ' Scan through each Element - Ask user if they want to add to tests
   For idx = 0 To Package.Elements.Count - 1
       Set oElement = Package.Elements.GetAt(idx)
       ' Check if there are details for this element to be output
        If oElement.Type = "Requirement" Then
           ' if so list the details for the element
           If MsgBox(oElement.Name + "  - Pass to test?", vbYesNo, _
           "Copy to Element Requirements") = vbYes Then
               ElementDetailToTest oElement
           End If
       End If
End Sub

Public Sub ElementDetailToTest(oElement As EA.Element)
    'Copy over the key details for a Requirement Element to Element Requirements
    Dim aTest As EA.Test, idx As Integer
    'Check the test is not already there
    For idx = 0 To oElement.Tests.Count - 1
       If oElement.Tests(idx).Name = oElement.Name Then
           MsgBox ("There is an existing Test of this name")
           Exit Sub
       End If
   ' Create a test case from the Formalrequirements
    Set aTest = oElement.Tests.AddNew(oElement.Name, "Standard")
    aTest.AcceptanceCriteria = oElement.Notes
    aTest.Input = oElement.Notes
End Sub

Public Function GetParams(ParamStr As String, ParamNum As Integer) As String
   Dim words() As String
   words = Split(ParamStr, ",")
   GetParams = words(ParamNum)
End Function

Public Function OpenRepos(EaProjName As String)

   'create the EA Reppository
   Set EARepos = New EA.Repository
   EARepos.OpenFile (EaProjName)                   'load up with sepcified path
   EARepos.ShowWindow (0)                          'optionally hide window

End Function



Pages: 1 ... 37 38 [39] 40