Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Tehila1 on February 12, 2014, 01:49:22 am

Title: Text or Diagram Hyperlink?
Post by: Tehila1 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.
Title: Re: Text or Diagram Hyperlink?
Post by: qwerty on February 12, 2014, 02:20:19 am
Hyperlinks have PDATA1 > 0 which is the diagram_id.

q.
Title: Re: Text or Diagram Hyperlink?
Post by: Tehila1 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"?
Title: Re: Text or Diagram Hyperlink?
Post by: qwerty 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.
Title: Re: Text or Diagram Hyperlink?
Post by: Tehila1 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.
Title: Re: Text or Diagram Hyperlink?
Post by: Eve on February 14, 2014, 08:22:00 am
Quote
Hyperlinks have PDATA1 > 0 which is the diagram_id.

q.
Actually != (or <>)
Title: Re: Text or Diagram Hyperlink?
Post by: qwerty 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.
Title: Re: Text or Diagram Hyperlink?
Post by: KP 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)
Title: Re: Text or Diagram Hyperlink?
Post by: qwerty on February 14, 2014, 09:21:08 pm
Quite exotic cases. I guess then != 0 is enough to know ;-)

Thanks.

q.