Book a Demo

Author Topic: Text element as a link to another diagram  (Read 4003 times)

Fabio Riera

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Text element as a link to another diagram
« on: July 29, 2013, 11:42:05 pm »
Hello,

I need to create a text element that links to another diagram.

Comparing the records in the database between a simple text and a text with link I found three diferences:

T_OBJECT.PDATA1 = The linked diagram ID.
T_DIAGRAMOBJECTS.SEQUENCE = ?
T_DIAGRAMOBJECTS.OBJECTSTYLE = "DUID=????"

My question is how to create a text element that links to another diagram programmatically?

Is there a way to do it without query the database?
If not, which fields and values in database I need to set?

Thanks in advance!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Text element as a link to another diagram
« Reply #1 on: July 29, 2013, 11:56:53 pm »
The PDATA can not be written via API you need to do that like
Code: [Select]
REpository.Execute ("UPDATE t_diagramobjects SET PDATA1 ... WHERE ...")The Sequence is for stacking elements on top of each other (I can't remember now which number is top and which is bottom; it's described in the help). The DUID is something EA-internal. You don't need to set it.

q.
« Last Edit: July 29, 2013, 11:57:54 pm by qwerty »

Fabio Riera

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Text element as a link to another diagram
« Reply #2 on: July 30, 2013, 03:03:38 am »
Ok, setting PDATA1 is only I need to transform a text element in link?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Text element as a link to another diagram
« Reply #3 on: July 30, 2013, 03:07:33 am »
AFAIR, yes. If you run into trouble just post here and I'll look into details once again.


q.

Fabio Riera

  • EA User
  • **
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Text element as a link to another diagram
« Reply #4 on: July 30, 2013, 09:13:49 pm »
thank you!! it worked fine!!! this was my last challenge to finish my addin! thanks again!