Book a Demo

Author Topic: creating sequence diagrams using api  (Read 3204 times)

thais

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
creating sequence diagrams using api
« on: September 19, 2010, 09:58:13 pm »
Hello,
I want to create a sequence diagram using the api of EA.
My problem is I can´t find a way to display the return from a function call and I don´t know how to display nested function calls.
Thanks for you help.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13455
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: creating sequence diagrams using api
« Reply #1 on: September 20, 2010, 03:23:56 pm »
Thais,

See http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1283517063/1#1 for the isReturn property.

As for the nested function calls, If I needed to find out I would:
- Make a regular message on a sequence diagram
- Inspect the t_connector table for this message
- Change this message into a "nested message"
- Compare the record in t_connector to the previous one (look first at pdata and style fields)

Whatever is changed is what defines the "nested" aspect.

Geert

thais

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: creating sequence diagrams using api
« Reply #2 on: September 22, 2010, 02:26:26 am »
Thanks for your help.
But how can I set those PDATA fields?

http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1283517063/1#1

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13455
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: creating sequence diagrams using api
« Reply #3 on: September 22, 2010, 03:45:13 am »
You can read them using the Element.miscData(index), but that property is read-only.
If you need to edit them use Repository.Execute(SqlString). This undocumented operation will execute any sql string you pass to it.

Geert