Book a Demo

Author Topic: Create new activity diagrams?  (Read 4317 times)

hansmaiser

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Create new activity diagrams?
« on: February 17, 2006, 07:31:21 am »
Hello,

is it possible to create an activity diagram in EA from a VB-exe with the automation interface?

If it is possible, can you tell me how?

Are there code samples available for things like this?

Thanks for your help!

hans
« Last Edit: February 17, 2006, 07:31:52 am by hansmaiser »

thomaskilian

  • Guest
Re: Create new activity diagrams?
« Reply #1 on: February 17, 2006, 08:22:15 am »
This is possible. You might look into the VB code sample delivered together with EA. I don't know whether this specific topic is covered :-/

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +55/-3
    • View Profile
Re: Create new activity diagrams?
« Reply #2 on: February 19, 2006, 01:55:55 pm »
You need to execute the AddNew() method on a Diagrams collection. So for example if you wanted to create an activity diagram beneath an element e:

Code: [Select]

Dim d as EA.Diagram
Set d = e.Diagrams.AddNew("Diagram Name", "Activity")
d.ShowDetails = False  ' or whatever settings you choose
d.Update
e.Diagrams.Refresh


or something like that.
The Sparx Team
[email protected]

hansmaiser

  • EA Novice
  • *
  • Posts: 14
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Create new activity diagrams?
« Reply #3 on: February 20, 2006, 03:25:35 am »
Ok, thanks for your answers.

Is there a tutorial for API available, because I don't know where I have to start...

I want to create Acitivity Diagrams with Activity, StateNode, Decsion, Dependency-Elements. Is there a good example for newbees?

Which approach would you advise me?

thomaskilian

  • Guest
Re: Create new activity diagrams?
« Reply #4 on: February 20, 2006, 08:08:58 am »
See my first post. This sample is a good start. If you encounter specific problems come back to this forum.