Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: jessicak on July 02, 2013, 08:18:36 pm

Title: Export Diagrams (for link in WordDoc)
Post by: jessicak on July 02, 2013, 08:18:36 pm
Hello everybody,

we want to use the diagrams created in EA as part of a word document (Software Architecture).
To keep the wordDoc automatically up to date, we've been using the HTML-Export option in EA and linked (not copied) the *.png Files into the wordDoc.
This works fine as long as e.g. nothing in the package structure is changed.

=> Is there any solution to export only the diagrams as images - with a unique ID and without dependency on the path of the package structure?

Many thanks in advance  :)

Title: Re: Export Diagrams (for link in WordDoc)
Post by: Ian Mitchell on July 02, 2013, 10:35:17 pm
eaDocX can do this!
Just create an eaDocX 'section' in your Word document, and put a diagram in it. In the background, eaDocX remembers the GUID of the diagram, no matter where you move it to.
Title: Re: Export Diagrams (for link in WordDoc)
Post by: Geert Bellekens on July 02, 2013, 10:41:23 pm
You can make a very simple script or program to export the diagram images to a file.

Must be no more then 20 lines of code.

Geert
Title: Re: Export Diagrams (for link in WordDoc)
Post by: jessicak on July 03, 2013, 12:50:04 am
Thank you both for your fast reply!

@Ian: I'll have a look at the addin

@Geert: I've never been using scripts for EA - do you have a hint where to start learning this, or even a example?

Thx
Title: Re: Export Diagrams (for link in WordDoc)
Post by: qwerty on July 03, 2013, 07:19:13 am
Just to throw in my ad :-) The Scripting book might be what you need.

q.
Title: Re: Export Diagrams (for link in WordDoc)
Post by: Dermot on July 03, 2013, 11:55:38 am
The RTF reports do support Bookmarks that can be referenced from a Word master Document. That way an update of the RTF report is updated in the Word Master document - see the help page:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/reporting/o526.html
Best to to just run a Diagram only report from the RTF report generator.
Title: Re: Export Diagrams (for link in WordDoc)
Post by: Geert Bellekens on July 03, 2013, 04:32:56 pm
Quote
@Geert: I've never been using scripts for EA - do you have a hint where to start learning this, or even a example?

There are a few resources you can look at
- the help file: there a whole automation section in the help file
- Thomas Kilians scripting book: https://leanpub.com/ScriptingEA
- The examples in the installation folder (on my machine on C:\Program Files (x86)\Sparx Systems\EA\Scripts)
- The community site: http://community.sparxsystems.com/community-resources
- this forum (there are a lot of posts with code snippets)
- My blog http://bellekens.com/2011/01/29/tutorial-create-your-first-c-enterprise-architect-addin-in-10-minutes/
- My open source repositories (C#) https://github.com/GeertBellekens

Geert
Title: Re: Export Diagrams (for link in WordDoc)
Post by: jessicak on July 03, 2013, 08:27:11 pm
Thank you all for your input!!! You're great!!!

Quote
The RTF reports do support Bookmarks that can be referenced from a Word master Document. That way an update of the RTF report is updated in the Word Master document - see the help page:
http://www.sparxsystems.com/enterprise_architect_user_guide/10/reporting/o526.html
Best to to just run a Diagram only report from the RTF report generator.

@Dermot: This is what I was looking for  :)

Unfortunatly it only works using the "Rich Text Format (RTF) Report" - if I use the "Diagrams only Report" it seems to me, that the bookmarks are missing in the *.rtf  :'(
Is there any way to configure the "Diagrams only Report" to include the bookmarks also? I'm using EA Version 7.5.847....
Title: Re: Export Diagrams (for link in WordDoc)
Post by: Dermot on July 05, 2013, 03:48:04 pm
I was meaning to refer to the tempalte supported in the RTF - called (diagrams template) - this does have the Bookmarks.