Book a Demo

Author Topic: Creating DiagramHyperlink via Automation Interface  (Read 6250 times)

Volchik

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Creating DiagramHyperlink via Automation Interface
« on: June 04, 2007, 04:24:35 am »
Could someone help with example of creating and placing Diagram hyperlink to diagram via Automation Interface.

Simply i have to automate tasks described in "Creating Hyperlinks between diagrams" topic of this help page:

http://www.sparxsystems.com.au/EAUserGuide/hyperlinks.htm

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating DiagramHyperlink via Automation Inter
« Reply #1 on: June 04, 2007, 07:07:23 am »
I can find no way of actually creating a hyperlink through automation.

This is a special type of Text element - so far so good. When you try to change it into a hyperlink you have to modify one of the database fields. It is read-only to the API.

Look up which field it is - I don't have it in front of me now, and you'll need the schema open when you do the rest of this anyway.

Now open a 'back channel' to the database via OLE DB. When you've added the Text element to the diagram, tweak the database. You may have to reload the diagram - even if you don't have it visible on the desktop.

David
No, you can't have it!

Volchik

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating DiagramHyperlink via Automation Inter
« Reply #2 on: June 04, 2007, 07:30:57 am »
Oops :(
Sad unexpectedness.

Thx anyway.

Volchik

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Creating DiagramHyperlink via Automation Inter
« Reply #3 on: June 04, 2007, 05:51:46 pm »
Not all too bad. ;)

There is method Execute in Repository interface so i have no need to open 'back channel'.

The field are named PDATA1 in table t_object if someone wants to know.

The problem is solved. Thx.
« Last Edit: June 04, 2007, 09:19:35 pm by Volchik »

Jude Ambrose

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Creating DiagramHyperlink via Automation Inter
« Reply #4 on: September 10, 2009, 08:03:08 pm »
HELLO ALL,

I am still not able to create a hyperlink via Automation.

@Midnight - I agree that its of ObjecType - Text. And also noticed that there is some change ni the PDATA. I dont know what exactly is PDATA? I queried the database and found the value of PDATA is 129 of the hypelinked object on the diagram.

Can anybody help with some sample code for the Hypelink creation by automation?

Best Regards,
Jude


«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Creating DiagramHyperlink via Automation Inter
« Reply #5 on: September 10, 2009, 08:44:35 pm »
The PDATA columns are available through the API via the MiscData fields. Unfortunately these are read-only fields as you can see in the documentation.

That does not (always) mean you cannot use the API to manipulate the contents of these columns, just that you cannot do so directly. Many of the other API settings and methods cause EA to set values in these columns.

The nice thing about this is that EA does all the work to make sure that the (entire) content of the columns are correct. The downsides are pretty severe though. Among the more obvious are that these columns remain 'magic' in the sense that they are undocumented; they are subject to change at any time, even between versions. Another is that not all the values can be changed via the API (at least not the published parts).

The limitation regarding hyperlinks was one I brought up with Sparx long ago, in EA 6.x days. Perhaps you should raise a formal feature request with Sparx now. If more people do so then the priority of this request might rise to the point where it is acted on.

Use the Feature Request link below the Support link near the Bottom of any forum page.

NOTE: For all I know there could be a way to do this, but it needs to be documented. [And we in the user community need to be told; this forum would be the right place.] IMHO that would be a satisfactory outcome.
No, you can't have it!

Jude Ambrose

  • EA Novice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Creating DiagramHyperlink via Automation Inter
« Reply #6 on: September 10, 2009, 09:03:49 pm »
hey midnight,

Thanx a lot for the brief reply. Will defintiely do a feature request.

cheers,
Jude

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Creating DiagramHyperlink via Automation Inter
« Reply #7 on: September 11, 2009, 09:01:22 am »
Quote
hey midnight,

Thanx a lot for the brief reply. Will definitely do a feature request.

cheers,
Jude
Hi Jude,  please confirm the request was formally made.  I need this functionality tomorrow!  :)  You should point Sparx at this Topic so that they can be aware of any discussion and can also participate.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!