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 - mitch99

Pages: [1]
1
I think my lesson learnt is that EA is not so straight forward in some situations, but on the other hand I'm impressed by it's flexibility, considering all the different methods suggested for solving this task.

Johann, thanks for clarifying things about the svg export, then it's not just my lack of knowledge of the svg-format... My initial thought after reading the add-in description was that you meant that the visual structure wasn't preserved, but as said, now I get it.

If things with EA were different, I agree with you both that svg would be the obvious way to do it, maybe in the next version :)

Cheers

2
Geert, thanks for the suggestion! Some other things got in the way, but so far I've downloaded the add-in and tried i manually. First i thought the diagrams would look rather strange since I read that "Unfortunately, structure and grouping of the diagram contents is not preserved." in the description of the add-in, but they came out as good as they look in the IDE, and quite small in regards of the size of the files as you said.

The next step was looking at the source files for the svg-diagrams, which I found rather hard to make any good sense of, in terms of getting the position data. It's probably due to my limited experience with the svg-format, but both the coordinate system and the structure of the xml elements didn't make much sense to me. I will have another go at it though.

Another thing is if you can call a add-in (eg. the svg export) via the automation interface? I guess you can, but I haven't found any hints of it in the automation reference manual or by some light googling.

Cheers


3
Johann: Thanks for the extra details, I was doing XMI 1.1 exports as it's the default, which didn't generate the same xml. This seems to be the only doable way at the moment to get the data I'm interested in.

Qwerty: Yes that would definitely be a good thing, perhaps I should start with a bug report as the coordinate data you get about the diagram objects and the generated diagram image don't match?

One thing I noticed is that each kind of export (html, save diagram as image, xmi-export) generates a different diagram image, interesting...

My current setup is:
1) Query the sparxDB for any diagrams (actually returning the package guid) that have changed since last export.
2) Export XMIs for each package containing changed diagrams
3) Parse the XMIs to get the offset for each diagram.
4) Show it nicely on a Asp.net website.

A bit more work than expected at first :)

4
Thank you for all your creative suggestions! I tried to investigate them a bit further today:

Qwerty: I tried to handle the cropping by moving the leftmost diagram object to the left edge of the drawing area and the same thing with the top object, but still the margins are different for the exported images.

As for the html-export, the diagram image is cropped differently from the "normal" export and has no borders and title built in. From the html-files you can get the proper coordinates to go with these images. The problem though, is that it's a little tricky to the the EA-identity of everything from the html export, since names are just a sequence starting from the one with first exported object. Although in every detail html page you can find the guid of the object, but in my case when you export a part of the the library and some diagram objects are not physically located under the same package no details html page will be generated for them (and therefore no guid/id to get hold of..)

Johann: Maybe it's a version issue or different types of diagrams, but my Archimate 2.0 XMI-exports doesn't contain these values unfortunately:
Code: [Select]
<UML:DiagramElement style="DUID=C1757C54;UCRect=1;HideIcon=0;" seqno="1" subject="EAID_D3F48851_0823_4025_A6CC_EF94737CE2AD" geometry="[highlight]Left=89;Top=200;Right=179;Bottom=270[/highlight];"/>

Still work to do ;)

5
Hi, I tried to find a solution here, but came up blank, so hopefully I'm just not thinking about it the right way.

I use the automation interface to export diagram images, which I use in a webbapp to show these images together with some mouseover notes picked up from the diagram objects.

To do this I need the position of each diagram object, so the mouseover will trigger when hovering over the right object/position. But when using the diagram object position values retreived from the automation interface the diagram objects won't align well with their counterparts in the image.

An obvious conclusion is that the added margins of the diagram image export (header, border etc..) isn't accounted for, which could be handled if they were the same on every exported diagram.

Unfortunately they seem to be different and I can't find a pattern to compensate for. So any help is appreciated!

Cheers,
Michael

Pages: [1]