Author Topic: Diagram Frame - Linked Diagram  (Read 3697 times)

rothnic

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Diagram Frame - Linked Diagram
« on: September 30, 2013, 10:06:40 am »
I'm trying to get the linked diagram via the scripting interface from a diagram frame. The sparx ea documentation states that the diagram frame is a composite element.

However, when I check isComposite, I get back False. If I set isComposite to True, then when calling .CompositeDiagram, the resulting CompositeDiagram is a blank composite structure diagram, instead of the linked document.

Am I missing something here? There has to be some way to access the linked diagram. The information has to be there somewhere since when I double click on the diagram frame it goes to the correct diagram.

rothnic

  • EA User
  • **
  • Posts: 91
  • Karma: +0/-0
    • View Profile
Re: Diagram Frame - Linked Diagram
« Reply #1 on: September 30, 2013, 10:57:04 am »
Well after looking further into Inside EA, I was able to find the answer. This is extremely non-intuitive though.

Code: [Select]
theDiagramID = theDiagramFrame.MiscData(0)
« Last Edit: September 30, 2013, 10:57:35 am by rothnic »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Diagram Frame - Linked Diagram
« Reply #2 on: September 30, 2013, 08:11:42 pm »
Well, that's why I wrote this book  ;)

q.