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

Pages: [1]
1
So I created a little .net app to interate through some of the sequence diagrams in the eaexample.eap that ships with EA.  Interestingly, the diagramlinks collection associated with a diagram do not always show up in the diagramlinks collection. The example below (it's just a form with one button) drills down to the Manage Contacts package  and loads the CreateContact Sequence Diagram. The DiagramLinks count is 0 for this diagram even though there are a bunch of diagramlinks on the page. If I do the same things on another sequence diagram, such as the "SE0002 Setup " sequence diagram in EAExample.eap, all of the diagramlinks come back and the count is 14. I wish someone would explain this to me!!


    Dim Package As EA.Package
       Dim EARepos As New EA.Repository
       EARepos.OpenFile("C:\Program Files\Sparx Systems\EA\EAExample.eap")
       Package = EARepos.Models.GetByName("Messenger")
       Package = Package.Packages.GetByName("Model Views")
       Package = Package.Packages.GetByName("Analysis Model")
       Package = Package.Packages.GetByName("Use Case Collaborations")
       Package = Package.Packages.GetByName("Manage Contacts")

       Dim idx As Integer, diag As EA.Diagram


       For idx = 0 To Package.Diagrams.Count - 1
           Dim idx2 As Integer, DiagramName As String
           diag = Package.Diagrams.GetAt(idx)
           DiagramName = diag.Name

           For idx2 = 0 To diag.DiagramLinks.Count - 1
               Dim CurrDiagramLink As EA.DiagramLink
               CurrDiagramLink = diag.DiagramLinks.GetAt(idx2)
               Dim ini As Long
               ini = CurrDiagramLink.ConnectorID
               Dim CurrConnector As EA.Connector, CurrConnectorName As String
               CurrConnector = EARepos.GetConnectorByID(ini)
               CurrConnectorName = CurrConnector.Name

           Next
       Next

2
I should clarify. When I list out all the connectors on a sequence daigram all connectors are listed, even ones not on the sequence diagram that I am accessing. When you list out all connectors (the only way to get at them as a property of diagramobects) there will be a number of connectors with similar sequenceno properties, and there is no way to tell the difference  between them. Take an actor named user. User could have 15 connectors and you could have more than one with similar sequenceno properties and no way to tell what diagram they belong to. That is the real issue I think, no way to match a connector to a diagram. HELP EA!

3
Automation Interface, Add-Ins and Tools / Re: Sequence Diagram Properties
« on: February 27, 2004, 04:15:59 pm »
Ok so I have all the messages listing out after my sequence diagram, my only issue is that it lists ALL of the connector messages that reside an any given sequence diagram. So if I have a business object like ApplicationState that sits on a sequence diagram, when I try to list out just the sequence of steps in the diagram using the connectors, I get a list of all instances of that connector on every diagram.

How can I specify that I just want the connectors that appear on a specific sequence diagram in the order that they are placed on the diagram? It is the same thing that the RTF generation outputs for a sequence diagram.

4
Automation Interface, Add-Ins and Tools / Sequence Diagram Properties
« on: February 26, 2004, 12:40:23 pm »
I am automating the creation of a word doc that pulls from EA. Specifically I am dumping the sequence diagrams out of EA into Microsoft Word. I can do that just fine. The problem I am having is in accessing the collaboration messages property. I canít find it in the documentation. I basically want to create the same table that is created using the Rich Text Documentation Export feature on sequence diagrams in Enterprise Architect that lists out all the messages of a sequence diagram in a table. Just can't find out where the  ID, Message, From Object, To Object and Notes properties are in the API. Thanks.

5
I have been trying to use the Automation Interface to produce custom documentation.  You can use it to dump your EA stuff into an existing .dot you have. It seems like it would work, but I can't get it to work the way the API says it should work, namely around the Connectors and DiagramLinks objects. If I could get those to return the values the documentation says they will return I would be ok. There is a sample download on this site to get you started.

Pages: [1]