Author Topic: Export diagrams to pictures  (Read 4673 times)

error

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Export diagrams to pictures
« 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
« Last Edit: November 27, 2012, 11:33:05 pm by pinky »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Export diagrams to pictures
« Reply #1 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.

Patrick Julian

  • EA User
  • **
  • Posts: 51
  • Karma: +0/-0
    • View Profile
Re: Export diagrams to pictures
« Reply #2 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.
« Last Edit: March 28, 2013, 04:36:05 am by observer »