Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - paradogma

Pages: [1]
1
Thank you! "eleLink.Update" did the trick!
I did the .update only on the DiagramObject but missed to do it for the Element, too.

May I bother you with more questions on hyperlinks?

- Is it possible, to use relative addressing for a hyperlink?
 (like "../../someFolder/someFile.htm")
 Currently I can only get results, when using absolute addressing like
 ("http://www.someDomain/someFolder/someFile.htm") or ("file://C:/someFolder/someFile.htm")
 Actually, I like to refer to a file that resides in a folder relative to the folder, where the model-file (*.ea) is.

- Is it possible, to include a "Subaddress", i.e. an "Anchor", into the hyperlink reference?
 Like "www.someUrl#someAnchorInTheTargetFile".
 Currently, a hyperlink that works with a simple URL, will not work, when I append an achor (by separating it with '#').
 Any chance?


Thank you

2
Thank you for your reply. And yes, I do have more questions.

I was aware of the fact that it is a two step process. This is what I did:

I created an EA.Element by
   ( 'pkg' is the EA.package in which the EA.diagram resides)
 
   Dim eleLink As EA.Element
   Set eleLink = pkg.Elements.AddNew("http://localhost/htdocs/test.html", "Text")
   eleLink.Subtype = 19   '// this was not done in the first attempt
   eleLink.Alias = "-->>"

And I created an EA.Diagram.DiagramObject by
   ( 'dia' is my diagram )  

   Dim dioL As EA.DiagramObject
   Set dioL = dia.DiagramObjects.AddNew ("l=100;r=20;t=10;b=18, "Text")
   dioL.ElementID = eleLink.ElementID
   dioL.DiagramID = dia.DiagramID

After that I ".reloadDiagram" and a diagram object shows up at the specified position. It also has the name I gave it (can check that in the GUI).
However it does not look like an external hyperlink. It does not show any text at all. Neither does it show the icon for a link.
It is simply an empty rectangle of the specified dimension with a dashed border.  
When I use the context-menue (right mouse click) on that diagram object and select "Text Properties" I only get a text field with the caption "Notes".
When I use the same context-menue on a manually created external hyperlink, I get a more elaborated dialog box, that allows me to edit the Hyperlink Address as well as the Alias and whether to display the Icon or not.

So obviously I am NOT creating the right type of object by my script.
What am I doing wrong?

Thank you in advance

3
The GUI offers a menue-item (as icon) in the Toolbar "UML Elements" which allows to create a hyperlink to an external file (e.g. on a webserver) on a diagram.
When I go through the repository, using the automation interface, I can find these hyperlinks in the collections of Elements of the corresponding package. I can find them in the collection of DiagramObjects of the corresponding diagram, too. When I check the Element.Type it says "Text".

I want to create such hyperlinks by a script via the automation interface.
But simply creating "Text" elements (diagramObjects) doesn't do the job.
What kind of object do I have to create?
And how can I set the URL it points to ("Hyperlink Address" in the GUI)?
How can I set the displayed text ("Alias" in the GUI)?

Does anybody know?

Thanks

4
oooooooops,

I apologize. Now I found it in the Help, too.
Did I miss any information on how too modify Font (Size, Color, Bold ...) as well?

Thank you for your effort

5
In the automation interface there is a method ".setAppearance()" for the object "element".
The method expects the parameters "scope", "item", "value". All of them are of type "long".
I didn't find any further documentation on that.
I like to change e.g. the Font-Size in an element of type "Note".
Or maybe the Back-Color.
The GUI offers a bunch of settings for the Appearance of a Diagram-Element.
How can I set these properties programmatically?

Does anybody know, what value (long) to set for what item (as well long)?

Thanks

Pages: [1]