Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic System Architect (steve huntington)
Decrease font size
Increase font size
Topic Title: Add a usecase to a UML diagram in VBA?
Topic Summary: This VBA adds a usecase that does not persist
Created On: 28-Sep-2007 13:55
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
Answer This question was answered by Toby Chaloner, on Monday, October 1, 2007 1:08 PM

Answer:
I have now discovered that I needed to create the underlying definition first
 28-Sep-2007 13:55
User is offline View Users Profile Print this message


Toby Chaloner

Posts: 29
Joined: 22-Aug-2007

The following VBA Macro attempts to create a new usecase on a diagram. When the diagram is reopened the symbol has been lost.  How do I add a new usecase to a diagram in VBA?

Sub problemUsecaseOnDiagramDemo()
    Dim diag As Diagram
    Set diag = Application.Encyclopedia.GetCurrentDiagram
    Dim uc As Symbol
    Set uc = diag.CreateSymbol("Create a big Wall", ETOOUSECASE)
    uc.Save
    diag.Save
    Set uc = Nothing
    Set diag = Nothing
End Sub

Any help would be much appreciated.

Report this to a Moderator Report this to a Moderator
 1-Oct-2007 13:08
User is offline View Users Profile Print this message


Toby Chaloner

Posts: 29
Joined: 22-Aug-2007

Answer Answer
I have now discovered that I needed to create the underlying definition first
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic System Architect forum.
There are currently 1 users logged in.
The most users ever online was 16 on 30-Oct-2008 at 14:46.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.