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

Pages: [1]
Hmm this is still a problem. When I start off from new, I open Word and EA. In Task Manager there is 1 EA process running. Then when the Set App = GetObject("", "EA.App") runs, another instance of EA process appears. This is probably to be expected, but I am not sure. Then the script fails again as per the OP.
When I close EA, the new (2nd) process still runs and it has to be killed manually.

Hmm strange, this now works. Without me having to do anything. I did reboot so, this may have fixed it. Tx for the help..

The way this works is as follows:
I have EA open and I edit a diagram
Then I switch (Alt-Tab) to Word and run this macro script from a toolbar button. Then this macro takes the currently open diagram in EA, saves it to a file and inserts it into the document at that point. I could have used the clipboard, but at the time when I used EA 7, the clipboard rendering was bad.

This worked in EA 7 and my current EA 13 when referencing an old EA COM object, but after reinstalling my system after a HDD crash 2 days ago, these scripts did not work anymore. Now it references the latest EA Object Model 2.1.

Any suggestions?

EDIT: just to clarify, this script runs in Word VBA

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]

General Board / Re: How to document test cases on state transition
« on: October 11, 2016, 11:36:50 pm »

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

General Board / Re: Method Parameter Tracing
« on: January 09, 2005, 11:40:53 am »
The downside of having to use an external tool is to export my whole model, etc. The question was two-fold. Firstly, how do other people keep track of the object interfaces i a easy way? One cannot keep it all in your head, especially if it changes a lot. Also if EA provided an easy way to view them (Project Browser is not elegant enough for this purpose), then it would be fine, but managing the required parameters down the call stack would be useful.

Secondly, I realise that this has nothing to do with UML per se, but wouldn't a feature like this enhance EA?


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

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


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

Pages: [1]