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

Pages: 1 ... 3 4 [5] 6
General Board / Re: How to get the currently open EA using automat
« on: June 26, 2003, 12:36:43 am »
I would also like to be able to do this - I don't think it's supported currently, but it would be a useful addition to a future release.

General Board / Re: Import Project Root
« on: May 29, 2003, 05:25:12 am » side effect I've noticed is that the imported project root becomes a view under the project root that you selected to overwrite.  Not sure how to overcome this....presumably that was what you meant in your original post...


General Board / Re: Import Project Root
« on: May 29, 2003, 05:18:49 am »

I believe the Export/Import Model options actually just export/import the project root that you've highlighted in the tree view, not the entire model.

At least it seems to work this way in the latest build (612).  Also, the "Strip GUUID" setting on import has to be checked to ensure that you don't just replace the original data.

Hope that helps.


General Board / Re: Bugs in 3.51.603
« on: February 26, 2003, 05:00:01 am »
Here's another one...
  • The File menu fades up really s l o w ly when you click on it (takes about 2 seconds).  Easily fixed by selecting another menu animation method though...

General Board / Re: Custom User Tools in EA v3.51
« on: February 19, 2003, 05:20:36 am »

Yes I certainly will - although it's just a twinkle in the eye at this stage.  Still thinking about a number of issues, and how we might go about resolving them:

  • We have several analysts working in parallel, so we want multi-user access.  I think we want the ability to lock and checkout individual packages which analysts will work on, then check-in and make them available to the whole group.  During the check-out, other users should see the last checked-in version (not live updates).
  • We want a master repository that is held on a server, for reference, backup etc. purposes.
  • Some analysts need to work offsite at certain times, so the ability to lock and check-out packages needs to be supported locally as well (i.e. such that you can take the model away, work on selected packages, then update the master repository later).

Having read this list, you're probably thinking of JET Replica DBs with Design Masters, but we've used these before (although not with EA) and it's given us some hairy moments, so we're abit reluctant.

We also want areas of the model locked read-only (to other users) during updates, so replicas wouldn't work I think.

Current (scatter-brained!) thoughts are:

  • Write a custom tool that is launched from the Tools menu, which acts as the glue between EA and the config control tool (which would probably be CVS)
  • The tool interacts with EA over the automation interface, in order to control import/export of packages during check-in/out process.  Could also switch on EA locking automatically if supported by the API (not sure off the top of my head).
  • Import and export to CVS would be via XML files.

Haven't yet worked out how the local/central repository thing would work yet.  Perhaps the CVS repository simply acts as the master and users need to synchronise the entire model (or selected bits of it) on a regular basis.  Hmm.  Not sure.


General Board / Re: Custom User Tools in EA v3.51
« on: February 18, 2003, 07:45:50 am »

Many thanks for this.  I had started to try a number of combinations, but gave up in the end.  

Just knowing the current package will be enough for my needs (we're looking at how to semi-automatically integrate EA with external config mgmt tools).  

If I find out how to pass element names across I'll let you know.


General Board / Custom User Tools in EA v3.51
« on: February 17, 2003, 10:28:26 am »
Hello all,

The release notes for EA v3.51 suggest that custom tools added into the Tools menu can be passed the name of the current element, package or diagram as a parameter - I quote..

"User tools menu. Allows addition of custom user tools - supports additional paramters for current diagram, element and package"

Does anyone know how to do this?  I can't find any details in the help file - i.e. how do you tell EA to pass the name of the current package/element/diagram as a parameter when launching a custom user tool?

Many Thanks.

General Board / Re: Copy package or object from one model to anoth
« on: February 13, 2003, 12:57:09 pm »
Try right-clicking on the package you want to export, and select the Import/Export option, which allows you to dump the package (and all elements/sub-packages to an XML file).

Open up the other model, right click on the parent package and select the Import/Export option again to pull the XML file into the model.

If the package already exists in the model I would suggest you delete it before importing (otherwise you risk getting GUID clashes during the import).

Hope that helps.

General Board / Use case as classifier
« on: January 16, 2003, 06:26:17 am »
Hello all,

Previous versions of EA allowed you to select a use case as a classifier, but for some reason this has stopped working - I now only see classes in the list of available classifiers.  Is this a bug (I'm using EA Build 589 - this was definitely a feature of earlier versions) ?

Specifically, you used to be able to draw a boundary onto a diagram and then set the boundary's classifier to be a use case (e.g. to show how the use case maps onto a business process).

Any help/hints much appreciated.


General Board / Re: Some question about EA
« on: January 05, 2003, 03:08:58 pm »
Further to Takeshi's comments on Q7...

In fact there are two variants of the Automation (COM) interface within EA, one that is read only, which presents XML views of the model, and a second one that is read-write.  You can download documentation for the read-write interface (including code examples) from the Sparx web site -  I think there's a link to it from the download page.


General Board / Re: Switching on security
« on: December 31, 2002, 06:00:24 am »

P.S.  You only have to type this key in once when you have the model open - the security feature is enabled on a per model basis and not in your local copy of EA, so everyone else should get a username/password dialog when opening that model file without them needing to treak anything.


General Board / Re: Switching on security
« on: December 31, 2002, 05:56:59 am »

There's a separate key that you need to enter when enabling security (not the same one as used to enable the product).  

Sparx has published it on the web site somewhere (but I can't remember where exactly - try the registered members area).  Also, when you upgraded to Corporate Edition you should have been sent this key by email.

Hope that helps.


General Board / Re: Importing requirements from Excel
« on: December 19, 2002, 08:33:07 am »
Hi Adrian,

I'm not aware of other material apart from what Sparx provides.  Much of what I wrote was based on perusing the HTML docs that you can download from Sparx.

Unfortunately the EA automation interface is late binding, which means that the usual VBA pop-dialogs telling you which methods/properties to use are not available, so its to some extent trial and error.

Good luck.


General Board / Re: Importing requirements from Excel
« on: December 19, 2002, 06:15:56 am »

Attached is the code I was talking about - sorry it's abit long.  It imports requirements from a table held in Word, but I think the same can be acheived quite easily in Excel (or you could copy/paste the data from Excel to Word if necessary).

Our URD had all requirements in a single Word table with the following columns...

  • Section Number - our User Requirements are structured hierarchically e.g. 1.1, 1.1.1, 1.1.2 etc.
  • Description - self explanatory
  • Priority - numeric indication of the importance of the UR.  The priority could also be "title", which means that the row doesn't contain a requirement, just a title/section in the requirements hierarchy.

The fact that the requirements are hierarchically numbered was useful because it meant that I could import them into a package hierarchy in EA.  I created a package in EA called "User Requirements" and under that another one called "Test URD Import".  The code then creates a "URD 1.0" package under that, and sub-packages reflecting the requirements hierarchy as found in the Word table.

If you're requirements aren't hierarchically structured you could probably achieve the same thing with much simpler code - the if-then-elses are all about keeping track of where the code is in the EA package hierarchy as it traverses the word table.

Hope that helps.


Sub Import_To_EA()
   Dim ReqTable As Table
   Dim URNumber As String
   Dim URSection As String
   Dim URDesc As String
   Dim URSectionLevel As Integer
   Dim LastSectionLevel As Integer
   Dim NewPackageName As String
   Dim ParentPackageID As Long
   Dim i_Nothing As Integer
   Dim ReqTitle As String
   Dim ReqNotes As String
   ' EA Objects
   Dim m_Repository As Object
   Dim m_Model As Object
   Dim m_Package As Object
   Dim m_NewPackage As Object
   Dim m_CurrPackage As Object
   Dim m_NewSubPackage As Object
   Dim m_Requirement As Object
   ' Obtain a reference to the EA automation interface
   Set m_Repository = CreateObject("EA.Repository")
   m_Repository.OpenFile ("C:\MyModel.EAP")

   ' Locate a reference to the word table that contains the requirements (4th table in the doc)
   Set ReqTable = ActiveDocument.Tables(4)
   ' Get reference to URD Import package
   Set m_Model = m_Repository.Models.GetByName("Views")
   Set m_Package = m_Model.Packages.GetByName("User Requirements") _
                       .Packages.GetByName("Test URD Import")
   ' Create a new package in the model that will receive the URs
   Set m_NewPackage = m_Package.Packages.AddNew("URD 1.0", "Package")
   If Not m_NewPackage.Update() Then
       MsgBox m_NewPackage.GetLastError()
   End If
   ' Refresh the packages collection to reflect the addition
   i_Nothing = m_Package.Packages.Refresh()
   ' Traverse the Word requirements table, adding packages/requirements into the model
   ' Possible bug in EA - you need to find the package you just created, otherwise you get errors when creating sub-packages from it...    
   Set m_CurrPackage = m_Package.Packages.GetByName("URD 1.0")
   LastSectionLevel = 0
   For RowNum = 2 To ReqTable.Rows.Count
       URNumber = ReqTable.Cell(RowNum, 1).Range.Text
       URNumber = Left$(URNumber, Len(URNumber) - 2)

       URSection = ReqTable.Cell(RowNum, 2).Range.ListFormat.ListString
       URSectionLevel = ReqTable.Cell(RowNum, 2).Range.ListFormat.ListLevelNumber

       URDesc = ReqTable.Cell(RowNum, 3).Range.Text
       URDesc = Left$(URDesc, Len(URDesc) - 2)
       URDesc = Replace(URDesc, Chr(13), Chr(13) & Chr(10))
       URPriority = ReqTable.Cell(RowNum, 4).Range.Text
       URPriority = Left$(URPriority, Len(URPriority) - 2)
       ' If the requirement is a title, create a new package to hold the requirements
       ' within that section.  If the section level is higher than the current package,
       ' the new one should be created at the level of the parent package.
       If URPriority = "Title" Then
           ' Requirement is a new title/section
           ' Package Name is section number + requirement text
           NewPackageName = URSection & " - " & URDesc
           If LastSectionLevel > URSectionLevel Then
               ' New section is above current package - so need to move up
               ' one or more levels in the package hierarchy
               For Count = 1 To (LastSectionLevel - URSectionLevel + 1)
                   ParentPackageID = m_CurrPackage.ParentID
                   Set m_CurrPackage = m_Repository.GetPackageByID(ParentPackageID)
           ElseIf LastSectionLevel = URSectionLevel Then
               ' New section is same level as current package - so use the parent
               ' of the current package
               ParentPackageID = m_CurrPackage.ParentID
               Set m_CurrPackage = m_Repository.GetPackageByID(ParentPackageID)
           End If
           Set m_NewSubPackage = m_CurrPackage.Packages.AddNew(NewPackageName, _
           If Not m_NewSubPackage.Update() Then
               MsgBox m_NewSubPackage.GetLastError()
           End If
           ' Refresh the packages collection to reflect the addition
           i_Nothing = m_CurrPackage.Packages.Refresh()
           ' Remember the section level we got to...
           LastSectionLevel = URSectionLevel
           Set m_CurrPackage = m_CurrPackage.Packages.GetByName(NewPackageName)
           ' Entry is a requirement - add a requirement entry to the current package
           ReqNotes = URNumber & " (" & URSection & ") - " & URDesc
           ' Object titles are restricted to 255 chars, and don't really want more than 100 chars anyway, so truncate
           If Len(ReqNotes) > 100 Then
               ReqTitle = Left$(ReqNotes, 100) & "..."
               ReqTitle = ReqNotes
           End If
           ' Add new requirement to EA
           Set m_Requirement = m_CurrPackage.Elements.AddNew(ReqTitle, "Requirement")
           m_Requirement.Notes = ReqNotes
           If Not m_Requirement.Update() Then
               MsgBox m_Requirement.GetLastError()
           End If
           ' Refresh the packages collection to reflect the addition
           i_Nothing = m_CurrPackage.Elements.Refresh()
       End If
End Sub

General Board / Re: Importing requirements from Excel
« on: December 19, 2002, 02:28:40 am »
I posted something a couple of weeks ago about importing around 800 requirements into EA (from Word) using the automation interface (i.e. VBA).  I'll see if I can dig up the code....


Pages: 1 ... 3 4 [5] 6