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.


Topics - bomber

Pages: [1]
1
I have a VBA script and macro that pastes the selected EA diagram into Word. The script worked in EA7 but I recently upgraded to EA13. The GetCurrentDiagram always returns null even if a diagram is open in a single instance of EA running behind Word.

Code: [Select]
[tt]Sub InsertSelectedEADiagram()
  Dim App As EA.App
  Dim dDiagram As EA.Diagram
  Dim sFilename As String
  Dim sShape As InlineShape
 
 Dim rep As New EA.Repository
 
  Set App = GetObject("", "EA.App")
  Set dDiagram = App.Repository.GetCurrentDiagram
'  If dDiagram = Null Then
'    MsgBox "No diagram selected"
'    Exit Sub
'  End If
 
  sFilename = "d:\" & Str(dDiagram.DiagramID) & ".emf "
  App.Project.PutDiagramImageToFile dDiagram.DiagramGUID, sFilename, 0
 
  Set sShape = Application.Selection.InlineShapes.AddPicture(Filename:=sFilename, LinkToFile:=False, SaveWithDocument:=True)
  sShape.AlternativeText = dDiagram.DiagramID
  sShape.Width = sShape.Width * 0.7
  sShape.Height = sShape.Height * 0.7
 
  Set sShape = Nothing
  Set dDiagram = Nothing
  Set App = Nothing
 
End Sub[/tt]

2
General Board / How to document test cases on state transition
« on: October 11, 2016, 11:04:44 pm »
I have a State diagram with transitions between the states. For each transition I want to capture/document the test cases that tests a particular transition. Not sure how to do this with EA13. I thought tagged values, but it seems only one tag of a particular type (Test Case) is allowed per connector.

Any suggestions
Louis

3
General Board / Method Parameter Tracing
« on: January 06, 2005, 03:55:53 am »
Tracing method parameters through deep call stack.

This is not really a UML or EA related question, but a general design question.
In the process of designing objects with methods that will implement some functionality, it is sometimes
necessary to change the parameters of the various methods. I realise that one should fix the interfaces,
but with a large system it is sometimes required.

When the set of objects and methods starts to get large and the method parameters change, I find it hard
to 'track or manage' the parameter integrity of the method call stack. For example I have a method that
has to call some methods in other objects to obtain values as well as internally calculate values. These
values are then used as input parameters to other methods that this method calls. This argument holds for
any level of the call stack. When I review a portion of the call stack, I need to make sure that I have
all the necessary values for the various input parameters of the methods I call at each level.

Now, a scenario diagram can show me this, but it gets very cluttered to the point of being unasable
especially if there are many parameters to the methods.

I would appreciate any tips or maybe their is merit in adding a diagram to EA purely for the purposes
of tracing parameters through a method call stack as extracted from the various scenario diagrams and
class definitions. It could look like this (COPY & PASTE INTO NOTEPAD TO USE FIXED WIDTH FONT FOR THIS PART - SORRY COULD NOT GET THIS TO LINE UP):



Obj.Method1   Obj.Method2   Obj.Method3
   |               |             |
----X               |             |
   |               |             |
   |---------------X             |
   |               |             |
   |               |-------------X
   |               |             |
   |               |             |




where the diagram looks like a scenario diagram and the X is the collapsed parameter list. When we
expand the parameter lists it would look like this:

ObjMethod1     ObjMethod2   ObjMethod3
   |               |           |
----> P1            |           |
   > P2            |           |
   > P3            |           |
   |               |           |
   |---------------> P1        |
   |               > P4        |
   |               |           |
   |               |-----------> P2
   |               |           > P4
   |               |           > P5
   |               |           |


This diagram will now tell me:
- What parameters ObjMethod1 expects
- P1 is passed through to the call to ObjMethod2
- ObjMethod2 requires P4 which ObjMethod1 has to get somewhere or calculate
- ObjMethod3 expects P2 which is passed to ObjMethod1, but may need to be passed through ObjMethod2
- ObjMethod3 requires P5 which ObjMethod2 has to get somewhere or calculate

etc....

I suppose one could do this with the AI or write an add-in....







Pages: [1]