Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Martin Walke on April 21, 2010, 11:26:53 pm

Title: Adding Use Case diagrams
Post by: Martin Walke on April 21, 2010, 11:26:53 pm
Hi all,

I'm trying to add Use Case diagrams to a model under Automation but keep getting a "type mismatch" error.  

This is my code in VB:

  Dim myDiagram As EA.DiagramObject
  
  Set myDiagram = parentPackage.Diagrams.AddNew("MyName", "Use Case")

I'm not 100% sure of the type of diagram of "Use Case" but that's what's shown in the table t_diagram when I've added diagrams manually.

TIA
Martin
Title: Re: Adding Use Case diagrams
Post by: Geert Bellekens on April 21, 2010, 11:50:56 pm
try
Code: [Select]
Dim myDiagram As EA.Diagram
Geert
Title: Re: Adding Use Case diagrams
Post by: Martin Walke on April 22, 2010, 12:54:35 am
Many thanks Geert. That did it. I think I had that originally but it was failing because of something else and then I changed too many things and got lost. :-[

BTW, thanks for the link to the Excel to EA importer. It give me a great kick start. [smiley=thumbsup.gif]