Author Topic: Adding Use Case diagrams  (Read 2586 times)

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Adding Use Case diagrams
« 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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13387
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Adding Use Case diagrams
« Reply #1 on: April 21, 2010, 11:50:56 pm »
try
Code: [Select]
Dim myDiagram As EA.Diagram
Geert
« Last Edit: April 21, 2010, 11:51:23 pm by Geert.Bellekens »

Martin Walke

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Adding Use Case diagrams
« Reply #2 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]