Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: nick.hynes on September 18, 2006, 02:08:02 pm

Title: Document Generation
Post by: nick.hynes on September 18, 2006, 02:08:02 pm
This remains the #1 issue for our organisation.

The architects are very happy with EA; however getting buy-in from the BA teams and channel managers is impeeded because of the issues surrounding document generation.

The issues for us are:


These two features would vastly improve our ability to deliver quality documentation to our outsourcers and integration partners.

We have read the related threads, and none of the solutions to date solve these specific problems.

Note: this issue has been reposted from a thread titled 'New RTF Generator...' because that thread seems to have died without a response.


Nicholas Hynes
Solution Architect
IAG (NZ)
Title: Re: Document Generation
Post by: thomaskilian on September 19, 2006, 07:02:36 am
The RTF thingy has been requested for years. You will likely have to wait for 7.0 or so....
Title: Re: Document Generation
Post by: «Midnight» on September 19, 2006, 10:33:20 am
Nick,

Some time ago - before EA had a WYSIWYG rtf feature - I ran up against the same kind of brick wall. After much pulling of hair and gnashing of teeth (and not a few dead ends with 'hand built' rtf files) I decided to build an automation tool that would handle documentation for me.

End result was a fair amount of work, but greatly improved documentation. Given what I now know about EA I realize the results could have been more favourable both ways.

Perhaps if this is important enough in your shop, and if you are going to reuse the capability a few times, it would be worth taking the time to build yourself a tool to take care of this. I know that does not solve your immediate problem, but the long run payoff might be sufficient to cover the inconvenience.

David
Title: Re: Document Generation
Post by: Ozzone on October 03, 2006, 06:06:07 am
I myself managed to produce quickly and easily rtf documents with the old generator. I run into many problems with the new one.

I have the same problems as stated here (heading levels) and some strange behaviour which my come from my not understanding the way the new template editor/generator works.

Can anybody help ond the heading levels and more generally in generating a nice report !
Title: Re: Document Generation
Post by: Jan ´Bary´ Glas on October 03, 2006, 06:14:28 am
It is not working in hand made templates.
Title: Re: Document Generation
Post by: nick.hynes on October 04, 2006, 07:02:21 pm
A further issue I've just discovered, is that the it is nearly impossible to reformat documents in Word.

If you open a generated RTF document in Word, and attempt to modify the heading styles, you will notice that there are a lot of inter-dependencies between the various heading styles. The complex of the way styles are defined, coupled with bugs in Word make it impossible to reformat documents.

I've found it is easier to 'paste as text' into a new Word document, and apply formatting to the new document. I'm not asking Sparx to fix Word, but you do need to be aware that this is how most people are currently using your product, and the bugs in Word exacerbate the issues your users have with EA.

This appears to be low hanging fruit in my eyes, and I'm surprised this isn't higher priority for Sparx. If you could re-write the document generation module you would experience significant uptake from your EXISTING CUSTOMER BASE.
Title: Re: Document Generation
Post by: sargasso on October 04, 2006, 08:04:19 pm
Nick,

IME the problem is not within the rtf generated by EA - it lies in the fact that rtf is not a Standard.  The rtf output is perfectly manipulatable in Word 97 but not in Word 2003 - Word 2003 manipulateable rtf is not useable in any prior version of Word.

As you say, the best (only) way is to paste the text into a formattable Word doc in the version of your choice.

MS have structurally changed the rtf spec so many times its ridiculous.  I think (IMO) the only tags left useable are bold and underline, let alone heading styles.



bruce
Title: Re: Document Generation
Post by: Ozzone on October 05, 2006, 12:46:16 am
Well, well, complying about rtf and word does not really help us right now.

My problem is still that it worked fine (that is I could produce a nice document in a few clicks) with the old generator in EA 5 and cannot anymore...

For the future, we could advise EA to produce Opendoc format http://en.wikipedia.org/wiki/OpenDoc and hope future versions of word will be able to read it.
Title: Re: Document Generation
Post by: Ozzone on October 05, 2006, 12:57:56 am
Ooops !

I should have proofread my entry. As stated on the page I mentioned

"the unrelated OpenDocument file format (formally known as the OASIS Open Document Format for Office Applications and usually abbreviated ODF) is sometimes mistakenly abbreviated to "OpenDoc", but this is an informal and coincidental abbreviation."

I meant OpenDocument file format of course !

Title: Re: Document Generation
Post by: Paolo F Cantoni on October 05, 2006, 01:08:30 am
Since Sparx is a primarily a Microsoft shop, I'd think they'd veer more towards:
Microsoft Office Open XML (http://en.wikipedia.org/wiki/Microsoft_Office_Open_XML)

(see also:Comparison of OpenDocument and Microsoft Office Open XML formats (http://en.wikipedia.org/wiki/Comparison_of_OpenDocument_and_Microsoft_Office_Open_XML_formats))

Paolo
Title: Re: Document Generation
Post by: «Midnight» on October 05, 2006, 04:11:52 am
MS has contributed considerable resources towards an open source project to build a converter between the two XML dialects. I don't remember the name of the project, but you can find it on SourceForge with some searching.
Title: Re: Document Generation
Post by: Ozzone on October 05, 2006, 07:33:16 am
Awaiting for a standard in word processing documents we will have to work with the current RTF generator.

It just took me 15 mins to generate and reformat a 40 pages requirement document. What I had to do is

- rebuild the desired paragraph styles and levels
- renumber the pictures

I did not have to do that in the prior version. Does anybody know better ?
Title: Re: Document Generation
Post by: peter.zrnko on October 06, 2006, 01:47:10 pm
Quote
It is not working in hand made templates.


I has to say, it's true. I've created a template, test it with on a small package with one element, it seems to be OK. Whe I run it on a big package it simply stop working somewhere in the middle without warning.

Is this realy so bad?
Title: Re: Document Generation
Post by: nick.hynes on October 08, 2006, 12:30:11 pm
Quote
Is this realy so bad?


In my opinion, 'yes'.

It depends where Sparx is positioning themselves in the market. I see them as serving... Enterprise Architects, who are responsible for large, corporate architectures. If so, then they need to be able to support large 'projects'. And the users (i.e. architects) need to be able to generate documentation for our partner companies, project teams and our line managers. Each of these groups expects professional quality documents, which can be quickly skimmed for detail or read and easily comprehended as a whole.

Currently, in order to produce documentation of that quality EA's users are required to perform time consuming, expensive and tedious manual work-arounds for what could simply be an automated process. This process is costly and can lead to the sorts of errors which leaves the user looking less than excellent in the eyes of their colleagues, managers and business partners.

So again, in my opinion this is a big issue, which could be easily fixed.
Title: Re: Document Generation
Post by: peter.zrnko on October 08, 2006, 10:24:52 pm
Quote

I've created a template, test it with on a small package with one element, it seems to be OK. Whe I run it on a big package it simply stop working somewhere in the middle without warning.
 


The problem was with a template where Atttribute section was just behind other field and exported class has no attributes. I've solved it by placing one empty line before attribute section:

Package:{Element.ParentPackage}

attribute >


I've reported this as a bug.
Title: Re: Document Generation
Post by: tdcoll on October 19, 2006, 05:52:37 am
I am also experiencing the same 'pain' as Nick and others.  

I just started using EA and was hoping to generate RTF documents with multi-level headings (following the package hierarchy I created in EA) - but can not find a way with in EA to do this.

What approaches are others using?
Title: Re: Document Generation
Post by: peter.zrnko on October 19, 2006, 06:05:02 am
I've tried to set "Adjust Heading levels" to Heading 9 (Document Options) when generating documentation for a package including nesting packages. In the template I had style Heading x (I think 3) for Package name.
In the resulted RTF document I've found different headings styles according to the package depths.

Unfortunately all with the same Level of overview (level 1). It seems it is possible to influnce the style according to package  depths, but not the level of overview.

See my post http://www.sparxsystems.com.au/cgi-bin/yabb/YaBB.pl?board=Automation;action=display;num=1161243686
Title: Re: Document Generation
Post by: mark.myers on November 14, 2006, 01:09:54 am
I have this working fine.  All headings and levels get adjusted according to the package depth.  To get it to work I had to define styles for Heading 1, Heading 2 etc (up to 9) in the template editor.  Without these styles defined the level/style will remain whatever you use in the template body.

Hope this helps.
Title: Re: Document Generation
Post by: nick.hynes on November 14, 2006, 12:36:12 pm
Thanks Mark.

I tried that, but it's still not working for me.

The Table of Contents is showing the headings at the correct level, but somehow my level 1 'Heading 1' style is being converted to a 'Heading 1 Char,H1 Char,Section Heading Char,EA Char,1 Char,h1 C' style, as are all of the child package headings.

The template is essentially defined like this (with a few cover pages):

[size=18]{Pkg.Name}[/size]  (Heading 1 style)

{Pkg.Notes}
diagram >

{Diagram.Name}

{Diagram.Notes}
{Diagram.DiagramImg}
{Diagram.Figure}
< diagram


package element >
< package element
element >

NAMEDescription
{Element.Name}{Element.Notes}


embedded elements >
< embedded elements
diagram >
< diagram
child elements >
< child elements
< element
child package >
< child package
< package
Title: Re: Document Generation
Post by: mark.myers on November 14, 2006, 02:50:25 pm
Quote
Thanks Mark.

I tried that, but it's still not working for me.

The Table of Contents is showing the headings at the correct level, but somehow my level 1 'Heading 1' style is being converted to a 'Heading 1 Char,H1 Char,Section Heading Char,EA Char,1 Char,h1 C' style, as are all of the child package headings.


Hmmm.  I will describe how I have it set up and that may give you some clues.  I have a Word document that is my master document and it contains my TOC and preamble.  Then I have a number of RTF files inserted as linked documents (below is my template that generates the requirements section).  The headings are replaced correctly (provided they are defined in the template - see prior post) but I have noticed that the field that contains the header is correctly styled as 'Heading 2' etc but that the end-paragraph character is styled as 'Heading 2 + Auto, Auto' ???

Perhaps it the way Heading 1 is defined in the template (you've probably had a few edits of it by now)  Try deleting the style and re-adding it (that's if you can find a way to delete the style - or start a new template and paste in the body)

Requirements template (full listing):
package >
{Pkg.Name} (Heading 1)

element >
Name
Notes
{Element.Name}
{Element.Notes}
< element
child packages >
< child packages
< package

Title: Re: Document Generation
Post by: peter.zrnko on November 14, 2006, 10:42:12 pm
BTW there is no posibility to delete a Style defined in a Template or at least I didn't found it.
Title: Re: Document Generation
Post by: Ozzone on November 15, 2006, 05:13:26 am
The way I found to delete styles is to export the template to a rtf file. In a text editor, edit the section where the styles are defined, then re-importing it !!!

For ex. {\s6\fs24\b\cf2\cb1\ulc2 heading 1;}

But make sure they are not used in the reste of the file (try searching "s6" in my example)

Title: Re: Document Generation
Post by: Ozzone on November 15, 2006, 05:15:00 am
Coming back to the solution proposed above, I does not work at all for me !!

If I specify "heading 1" for  {pkg.name} it remains as heading 1 in the whole document !  ???
Title: Re: Document Generation
Post by: Ozzone on November 15, 2006, 05:16:22 am
Could Mark Myers export his template in rtf and add it in this thread ?

Thanks
Title: Re: Document Generation
Post by: mark.myers on November 15, 2006, 02:41:34 pm
Quote
Could Mark Myers export his template in rtf and add it in this thread ?

Thanks


As requested, here is the RTF export of my requirements template.  As I said, the critical thing for me was to define Heading 2, 3 & 4 in the EA template.  I couldn't find any way to attach/upload a file to this post  :-/ so I have pasted the raw text here but I'm not sure if you'll be able to recreate the template from it.
Code: [Select]

{\rtf1\ansi\deflang3081\ftnbj\uc1\deff1
{\fonttbl{\f0 \froman \fcharset0 Times New Roman;}{\f1 \fswiss \fcharset0 Arial;}{\f2 \fswiss \fcharset0 ;}{\f3 \froman \fcharset0 ;}{\f4 \fswiss \fcharset0 Lucida Sans;}}
{\colortbl ;\red255\green255\blue255 ;\red0\green0\blue0 ;\red255\green255\blue128 ;\red73\green0\blue65 ;\red250\green255\blue255 ;\red0\green16\blue0 ;\red128\green255\blue255 ;}
{\stylesheet{\fs20\cf2\cb1\ulc2 Normal;}{\cs1\cf2\cb1\ulc2 Default Paragraph Font;}{\cs2\f4\fs16\b\protect\cf0\cb3\ulc2 SSBookmark;}{\s3\cf2\cb1\ulc0 ;}{\s4\fs20\cf2\cb1\ulc0\tqc\tx4320\tqr\tx8640 footer;}{\cs5\cf2\cb1\ulc0 page number;}{\s6\f1\fs28\cf2\cb1\ulc2
Heading 1;}{\s7\f1\fs22\cf2\cb1\ulc2 Plain Text;}{\s8\f1\fs22\cf2\cb1\ulc2\outlinelevel1 Heading 2;}{\s9\f1\fs22\cf2\cb1\ulc2\outlinelevel2 Heading 3;}{\s10\f1\fs22\b\cf0\cb1\ulc0\outlinelevel3 Heading 4;}}
\paperw11908\paperh16833\margl1800\margr1800\margt1440\margb1440\headery720\footery720\deftab720\formshade\aendnotes\aftnnrlc\pgbrdrhead\pgbrdrfoot
\sectd\pgwsxn11908\pghsxn16833\marglsxn1800\margrsxn1800\margtsxn1440\margbsxn1440\headery720\footery720\sbkpage\pgncont\pgndec
\plain\plain\f1\fs20
{\header
\trowd\trgaph108\trleft0
\clvertalt\clbrdrb\brdrs\brdrw10\cellx2844
\clvertalt\clbrdrb\brdrs\brdrw10\cellx5796
\clvertalt\clbrdrb\brdrs\brdrw10\cellx9540
\pard\intbl\s0\ql\widctlpar\plain\f1\fs20\lang1033\f3\cf2\fs22 Requirements \cell
\pard\intbl\s0\qc\widctlpar\plain\f1\fs20\lang1033\f3\cf2\fs22\cell
\pard\intbl\s0\qr\widctlpar\plain\f1\fs20\lang1033\f3\cf2\fs22{\field{\fldinst TIME \\@ "dddd, MMMM dd, yyyy"}{\fldrslt Friday, April 29, 2005}}\cell
\intbl\row
\trowd\trgaph108\trleft0\trrh-20
\clvertalt\clbrdrt\brdrs\brdrw10\cellx2844
\clvertalt\clbrdrt\brdrs\brdrw10\cellx5796
\clvertalt\clbrdrt\brdrs\brdrw10\cellx9540
\pard\intbl\s0\ql\widctlpar\plain\f1\fs20\lang1033\f3\cf2\fs22\cell
\pard\intbl\s0\ql\widctlpar\plain\f1\fs20\lang1033\f3\cf2\fs22\cell
\pard\intbl\s0\ql\widctlpar\plain\f1\fs20\lang1033\f3\cf2\fs22\cell
\intbl\row
\pard\s0\ql\plain\f1\fs20\f2\cf2\fs22\par\plain\f1\fs20}
{\footer\pard\s4\tqc\tx4320\tqr\tx8640\qc\widctlpar\plain\f1\fs20\lang1033\f0\cf2 ________________________________________________________________________\cs5{\field{\fldinst PAGE}{\fldrslt 1}}\cs1\pard\s4\tqc\tx4320\tqr\tx8640\qc\widctlpar\par\pard\s0\ql\plain\f1\fs20\f2\cf2\fs22\par\plain\f1\fs20}
\pard\s6\ql{\*\bkmkstart Pkg_Begin}{\*\bkmkend Pkg_Begin}\cs2\lang1033\f4\highlight3\fs16\b\protect package {\*\bkmkstart Pkg_Begin_Inner}{\*\bkmkend Pkg_Begin_Inner}>\cs1\lang3081\f1\highlight1\ulc0\fs28\b0\protect0\par\plain\f1\fs20{\field\fldlock{\*\fldinst
MERGEFIELD \lang1033\f1\ulc0\fs28\b Pkg.Name}{\fldrslt\lang1033\f1\ulc0\fs28\b \{Pkg.Name\}}}\ulc0\fs28\par\pard\s7\ql\plain\f1\fs20\ulc0\fs22\par{\*\bkmkstart Pkg_Element_Begin}{\*\bkmkend Pkg_Element_Begin}\cs2\lang1033\f4\highlight3\ulc2\fs16\b\protect
element {\*\bkmkstart Pkg_Element_Begin_Inner}{\*\bkmkend Pkg_Element_Begin_Inner}>\cs1\lang3081\f1\highlight1\ulc0\fs22\b0\protect0\par
\trowd\trgaph60\trleft0\trrh245\trhdr
\clvertalt\clbrdrt\brdrs\brdrw1\clbrdrb\brdrs\brdrw1\clbrdrl\brdrs\brdrw1\clbrdrr\brdrs\brdrw1\cellx3150
\clvertalt\clbrdrt\brdrs\brdrw1\clbrdrb\brdrs\brdrw1\clbrdrl\brdrs\brdrw1\clbrdrr\brdrs\brdrw1\cellx8640
\pard\intbl\s7\ql\plain\f1\fs20\lang1033\f1\ulc0\fs22\b Name\cell
\pard\intbl\s7\ql\plain\f1\fs20\lang1033\f1\ulc0\fs22\b Notes\cell
\lang3081\f1\b0\intbl\row
\trowd\trgaph60\trleft0
\clvertalt\clbrdrt\brdrs\brdrw1\clbrdrb\brdrs\brdrw1\clbrdrl\brdrs\brdrw1\clbrdrr\brdrs\brdrw1\cellx3150
\clvertalt\clbrdrt\brdrs\brdrw1\clbrdrb\brdrs\brdrw1\clbrdrl\brdrs\brdrw1\clbrdrr\brdrs\brdrw1\cellx8640
\pard\intbl\s7\ql\plain\f1\fs20{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f1\ulc0\fs22 Element.Name}{\fldrslt\lang1033\f1\ulc0\fs22 \{Element.Name\}}}\ulc0\fs22\cell
\pard\intbl\s7\ql\plain\f1\fs20{\field\fldlock{\*\fldinst MERGEFIELD \lang1033\f1\ulc0\fs22 Element.Notes}{\fldrslt\lang1033\f1\ulc0\fs22 \{Element.Notes\}}}\ulc0\fs22\cell
\intbl\row
\pard\s7\ql\plain\f1\fs20{\*\bkmkstart Pkg_Element_End_Inner}{\*\bkmkend Pkg_Element_End_Inner}\cs2\lang1033\f4\highlight3\fs16\b\protect < elemen{\*\bkmkstart Pkg_Element_End}{\*\bkmkend Pkg_Element_End}t\cs1\lang3081\f1\highlight1\ulc0\fs22\b0\protect0\par\plain\f1\fs20{\*\bkmkstart
Pkg_Pkg_Begin}{\*\bkmkend Pkg_Pkg_Begin}\cs2\lang1033\f4\highlight3\fs16\b\protect child packages {\*\bkmkstart Pkg_Pkg_Begin_Inner}{\*\bkmkend Pkg_Pkg_Begin_Inner}>\cs1\lang3081\f1\highlight1\ulc0\fs22\b0\protect0\par{\*\bkmkstart Pkg_Pkg_End_Inner}{\*\bkmkend
Pkg_Pkg_End_Inner}\cs2\lang1033\f4\highlight3\ulc2\fs16\b\protect < child package{\*\bkmkstart Pkg_Pkg_End}{\*\bkmkend Pkg_Pkg_End}s\cs1\lang3081\f1\highlight1\ulc0\fs22\b0\protect0\par\plain\f1\fs20{\*\bkmkstart Pkg_End_Inner}{\*\bkmkend Pkg_End_Inner}\cs2\lang1033\f4\highlight3\fs16\b\protect
< packag{\*\bkmkstart Pkg_End}{\*\bkmkend Pkg_End}e\cs1\lang3081\f1\highlight1\ulc0\fs22\b0\protect0\par\par}
Title: Re: Document Generation
Post by: Eve on November 15, 2006, 04:10:03 pm
May be worth adding it to the EA User Group site.  http://www.eausergroup.org/

I suspect it may be easier to add it to the SharePoint site.
Title: Re: Document Generation
Post by: jorgemusprime on December 01, 2006, 05:37:52 pm
Hello there,

I'm new with EA. I Know that you may be had been discussing this. But I'm gonna ask it any way.

Its possible to create document with an a personalized style including header and the footer. Is that possible?. how?.

If it is possible, please somebody tell me how!!

I need to know it realy soon!.

Regards.

Jorge
Title: Re: Document Generation
Post by: nick.hynes on December 03, 2006, 03:31:41 pm
Hi  All,

I finally got this working, thanks for all the help & advice.

The solution was to go back to the 'basic template' as a starting point. I then modified that in an iterative fashion until I had what I wanted.

It was a slow process, and you need to be careful when you cut and paste not to screw up the document styles.

Persevere - it can be done.

- Nick Hynes
Title: Re: Document Generation
Post by: jorgemusprime on December 05, 2006, 01:56:30 am
Hello,

I have a problem and I need your help for to fix it.

I have made a diagram that is to long. So, when I generate the documentation the picture  is to small and is very unusefull.

Is there any way for to cut the image and use, for example, three pages?.

HELP PLEASE!!!!!......

looking forward hear you soon,

regards,

Jorge
Title: Re: Document Generation
Post by: StefanPears on December 05, 2006, 02:05:56 am
Hi Jorge,

I will be very lucky if s.o. has a better answer than this one: I fear, you will have to save your diagram as image. Cut it into pieces with a third party tool (e.g. irfanview) and manually insert the segments into your document.

Stefan
Title: Re: Document Generation
Post by: jorgemusprime on December 05, 2006, 02:10:18 am
hi Stefan,

Thanks for answering me so soon. But I was wandering to know if the EA could do it for it self. May be insterting conectors or something. Is that possible?.

regards,

Jorge
Title: Re: Document Generation
Post by: Thogek on December 11, 2006, 11:24:35 am
Quote
I have made a diagram that is to long. So, when I generate the documentation the picture is to small and is very unusefull.

You may also want to consider splitting the diagram up logically, perhaps into one high-level overview diagram and then sectional close-up diagram views.  (Odd are, if it's such that it cannot be rendered clearly on one page, then it's likely that there's a lot for a human to absorb in that one diagram, as well.)

Whether that's a viable option will depend on your circumstances, of course...
Title: Re: Document Generation
Post by: Thogek on December 11, 2006, 11:36:24 am
Quote
BTW there is no posibility to delete a Style defined in a Template or at least I didn't found it.

Same here.  This seems like a major (and rather frustrating) oversight in the RTF Template interface...
Title: Re: Document Generation
Post by: Paolo F Cantoni on July 12, 2007, 01:06:20 pm
There's an interesting podcast: [size=13]OpenDocument and the Move to XML Formats[/size] (http://osc.gigavox.com/shows/detail1810.html).

[size=10]"Customers are now implementing solutions based upon the OASIS OpenDocument Format (ODF) and Microsoft's OpenXML standard, endorsed by ECMA, but that's just the tip of the iceberg. Billions of word processing and spreadsheet files are being converted to XML in one of these two formats. OpenDocument expert Gary Edwards believes that adopting OpenXML means lock-in to Microsoft products on an unprecedented scale. In this podcast, Edwards defends OpenDocument's capabilities but also challenges the ODF community to out-innovate Microsoft to provide a competitive alternative to Microsoft's lock-in. He also challenges the open standards community to focus on delivering alternatives to Microsoft Exchange and SharePoint servers. Edwards also describes Open Document Foundation's da Vinci plug-ins for Microsoft Office."[/size]

It's long (about 1.25 hours) but I found it very interesting.  In it Gary mentions MS are dropping RTF as of Office 2008.

Enjoy...
Paolo