Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: error on November 27, 2012, 11:29:51 pm

Title: Export diagrams to pictures
Post by: error on November 27, 2012, 11:29:51 pm
Hello everybody

I'm a beginner so I haven't a lot experiences.
I'm trying to find out how i can convert the UML diagrams to pictures (for example ".jpg") and I want do this in an add-in.
So I have to find all diagrams in all my folders in the Enterprise Architect UML and then export them all to pictures. After this, all existing UML diagrams in my project should be a singular exported picture.

can you help me? have you any idea how to realize it on visual studio C#?
thanks a lot  ;)

greets
Markus
Title: Re: Export diagrams to pictures
Post by: qwerty on November 27, 2012, 11:57:24 pm
Use
Code: [Select]
PutDiagramImageToFile (
string Diagram GUID,
string FileName,
long Type)
from the project interface to save the image.

q.
Title: Re: Export diagrams to pictures
Post by: Patrick Julian on March 28, 2013, 04:35:31 am
Quote
I'm trying to find out how i can convert the UML diagrams to pictures (for example ".jpg") and I want do this in an add-in.

This might be too late for you as the question dates back to the end of last year. Anyway: EA does this for you. Generate a "Diagrams only Report" (Crtl + Shift + F8). Then DESELECT the checkbox "Embed diagrams in document" and choose the format that best fits your requirements. Sadly, JPG and PNG are not selectable.
When you generated the report, the image files will be in a subfolder named "Images", named and ordered by their respective GUID.

You may then batch-convert them into a more reasonable image format like PNG using a software of your choice.