Author Topic: Text or Diagram Hyperlink?  (Read 5373 times)

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Text or Diagram Hyperlink?
« on: February 12, 2014, 01:49:22 am »
Hello!

How can I refer in my program in a different way to a diagram hyperlink (type= text) and a simple text box (type=text)?

Thanks.

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #1 on: February 12, 2014, 02:20:19 am »
Hyperlinks have PDATA1 > 0 which is the diagram_id.

q.

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #2 on: February 12, 2014, 03:23:29 am »
Thanks for quick reply!
How I manage the PDATA1 from the model element which its type is "Text"?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #3 on: February 12, 2014, 03:52:58 am »
PDATA corresponds to MiscData in the API where it's r/o. To change it use Repository.Execute with an appropriate UPDATE.

q.

Tehila1

  • EA User
  • **
  • Posts: 256
  • Karma: +0/-0
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #4 on: February 14, 2014, 12:30:58 am »
For other's sake:
MiscData(0) corresponds to PData1 which contains the appropriate diagram ID in case the element is a diagram hyperlink.

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8085
  • Karma: +118/-20
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #5 on: February 14, 2014, 08:22:00 am »
Quote
Hyperlinks have PDATA1 > 0 which is the diagram_id.

q.
Actually != (or <>)

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #6 on: February 14, 2014, 11:48:00 am »
So there are negative entries as well. What do I have to do to have you tell me which those are?

q.

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #7 on: February 14, 2014, 11:52:44 am »
Quote
So there are negative entries as well. What do I have to do to have you tell me which those are?
I think it's only when using JET 4 replication that negative IDs are created.

Edit: And SQL Server might create negatives too. Most users would never need to worry about it (but, of course, we do)
« Last Edit: February 14, 2014, 12:08:30 pm by KP »
The Sparx Team
[email protected]

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Text or Diagram Hyperlink?
« Reply #8 on: February 14, 2014, 09:21:08 pm »
Quite exotic cases. I guess then != 0 is enough to know ;-)

Thanks.

q.