Author Topic: Diagram included as a Diagram Frame  (Read 4575 times)

Marco.Farini

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Diagram included as a Diagram Frame
« on: April 12, 2004, 08:26:26 am »
Hi,

I see that EA4 allows to include a diagram on another diagram as Diagram Frame (an excellent feature, I love it!). How can I achieve that using the AUtomation Interface though? I can not find a mention of this in the help.

Marco
« Last Edit: April 12, 2004, 08:26:38 am by Marco.Farini »

Stephen

  • EA User
  • **
  • Posts: 54
  • Karma: +0/-0
    • View Profile
Re: Diagram included as a Diagram Frame
« Reply #1 on: April 14, 2004, 01:56:13 am »
Marco,

Look at the automation docs for Diagram Objects.
A diagram object will be found in the elements collection the same as anything else. Armed with the elementID you can add diagrams in the same way that you add any (say) class element.
Search by Type. For diagrams Type is undocumented (in the help file) "UMLDiagram"

BTW - Thanks for the tip about embedding diagrams, I hadn't discovered the feature!

Marco.Farini

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Diagram included as a Diagram Frame
« Reply #2 on: April 14, 2004, 05:00:07 am »
Hi Stephen,

thanks again, you are great help as always!
However, via EA I can place a diagram onto another diagram either as a hyperlink or as a diagram frame. How do I distinguish between the two options via AI?

Thanks!

Marco

adbwork

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Diagram included as a Diagram Frame
« Reply #3 on: May 19, 2004, 03:33:09 pm »
I'm trying to traverse an EA model and extract details / diagrams / etc. into a document (I'm using C# and the  automation interface exposed via the COM interop layer).  I'm relating a class to a diagram by using a diagram reference object fro the diagram and creating a relationship between the class and the diagram reference.  I get the class reference, and can follow it's Connectors collection to get a handle to the UMLDiagram element.  

BUT - how do I get a handle to the actual  Diagram object that the UMLDiagram element refers to?  

I note in the database that the unique ID of the diagram is held in the pdata1 column of the UMLDiagram object, but I can't see any property of the EA.Element class that makes that value available in any way.  It's not in the custom properties collection for example.

Any ideas?
Andrew Bennett

dkkoenig

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Diagram included as a Diagram Frame
« Reply #4 on: September 25, 2007, 02:00:28 pm »
 ???

i have the same problem

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Diagram included as a Diagram Frame
« Reply #5 on: September 25, 2007, 02:40:17 pm »
Use the appropriate MiscData(0) property. See the help file for more information.

Remember, this is a read-only field. My take on this - entirely without proof, and I'd be delighted if Sparx would contradict me - is that the content and format of this field is subject to change, perhaps between builds.

Still, keep watching the SDK section of the EA docs for more on this. Sparx is working on extending the documentation for things like this, so perhaps we'll see how these things work sometime soon.

[Thanks once again Roy, et al. Your work is making a difference, and is appreciated.]

HTH, David
No, you can't have it!

dkkoenig

  • EA Novice
  • *
  • Posts: 16
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Diagram included as a Diagram Frame
« Reply #6 on: September 25, 2007, 03:11:55 pm »
 :( MiscData(0) is Read-Only, but we need to write

i read the "Help" every day, but i think, this documentation is not so exact, many thinks are not discuss, (nType of element ...)

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Diagram included as a Diagram Frame
« Reply #7 on: September 26, 2007, 01:54:37 am »
Search my posts over the previous 2 days or so for hints on how to get around the read-only problem with this field (and others).

David
No, you can't have it!