Book a Demo

Author Topic: RTF documents, manual and generated  (Read 11151 times)

Mr. PJR

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
RTF documents, manual and generated
« on: October 01, 2010, 10:47:38 pm »
I need to generate an RTF document like this:
a) I have first few pages that I need to fill in manually. I will use a template as the skeleton, but obv I don't want to type in the contents into the template but just take the doc skeleton from it.
b) The rest of the document would be generated from one sub-branch of the model.
-> The output should be one RTF-document file that has the manual part at the beginning and after that the generated part.

I've tried to use the master document/model document-system and I can get the automated part generated ok, but I haven't succeeded in getting any manual contents included. For example, I tried adding a document artifact into the Master document before the model document and added a linked doc into it but the linked doc won't get printed. And I've also added a linked a doc into the master doc but that won't get printed either.

I guess something like this would be optimal:
a) Create one document artifact and type in a linked document into it.
b) Create one model document and select a template and associate a package into it.
c) Add both a) and b) to the master document.
d) Generate RTF doc from the master document and this would include merged result of the manual part from a) and generated part from b).

Is anything like this possible?

If not, I guess I'd need then to just create a separate Word-document and type in the manual content there and then generate the model document and link that to the word doc. This works ok, but then I can't manage everything inside the EA model which is something I'd like to be able to do.

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: RTF documents, manual and generated
« Reply #1 on: October 04, 2010, 07:22:26 am »
A few suggestions that might help.

1) I can't recommend the use of document artefacts in a master document, they don't format very consistently, and I am not clear about what they are to be used for.

2) for the fixed manual content either
    a) use the template
or
    b) use a Linked document
or
    c) have a package for "manual content" and use the notes field for the content

Then have a model document for your fixed content, and another model document for your generated content.
Each model document can contain as many packages you you need
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.

Mr. PJR

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RTF documents, manual and generated
« Reply #2 on: October 04, 2010, 04:29:25 pm »
Could you elaborate on the usage of the linked document? I've tried to use them, but I can't get them to be printed out. Into which element should I attach the linked document to get it included in the generation? I've tried adding a linked document to the master document as well as the model document, but it isn't included in the generated output.

In this case the manual content would be separate chapters (i.e. body text for sections like 1.1 Overview, 1.2 Scope and 1.3 References and then following generated contents from heading 2 onwards) with heading numbering so I'm not sure if notes field would be flexible enough.

Basically the structure of the single generated doc would be roughly like this:
- Cover page
- Table of contents
- One page for document history table
- 1 Introduction
- 1.1 Overview
(manual content here)
- 1.2 Scope
(manual content here)
- 1.3 References
(manual content here, a table with document references)
- 2.0 Components
(here would be generate contents from the component model, one section per package and obv this works nice with the model document)

So I was basically hoping to get everything before heading 2.0 included into a single linked document that I'd edit manually. But I just can't figure out into which element I should specifically create the linked doc to get it included in the start of the generation.

Mr. PJR

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RTF documents, manual and generated
« Reply #3 on: October 04, 2010, 05:08:20 pm »
Ok, I think I figured it out.

Does this sound reasonable:
a) Forget about the master document and create only model documents.
b) Create linked RTF-document to the main level package (Components) and type the manual content into this document.
c) Create a template that includes the Package\Element\Linked Document into the generated document in the beginning.
d) Add other package elements into the template after that.
e) Add the Components-package into the model document-element.

Now when the model document is generate, it picks up the linked document from the top-level package (i.e. Components) and then generates the child packages below it where each package represents one component.

This looks like an solution to my issue, right?

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: RTF documents, manual and generated
« Reply #4 on: October 05, 2010, 09:46:32 am »
A couple of points.

A Document Artifact is nothing to do with Virtual Documents. In the Toolbox, it coincidentally shares a page with the Model Document and Master Document elements, but they have different purposes.

The Document Artifact is a mechanism for adding a relatively large quantity of formatted descriptive text to a specific element, in the form of a linked document. In the past it was the only means of adding a linked document, and for the Desktop and Professional editions of Enterprise Architect it still is the only means of adding a linked document to an element. For the Corporate and 'suite' editions you can add a linked document to an element directly, and that is a better mechanism.

A linked document is a container for a relatively large quantity of formatted descriptive text about a specific element. If you have a linked document on a Package, it is to document the Package element rather than to document the content of the Package. It is not intended to create either skeleton or boilerplate text for a report - you put that text in the RTF template you are using, whether it be used in a Master Document element or a Model Document element, or in a 'normal' RTF report.

I'm not sure what you want to acheive with the "manual content", but if nobody else chips in with some help on the forum, please send a support request to Sparx Support and they can work through the process and help you develop a solution.
Best Regards, Roy

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: RTF documents, manual and generated
« Reply #5 on: October 05, 2010, 06:26:33 pm »
I understand what you are trying to do as I've used both methods in the past so you can use either one of those approaches. The trick with the "document artifact>linked document attached" method is to ensure that the template you use for the master document has following box tick in the sections explorer of the template. Package>Element>Linked Document. Once that has been ticked it will include the contents of the text of the document artifact>linked document. Cool eh?  8-)
Happy to help
:)

Mr. PJR

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: RTF documents, manual and generated
« Reply #6 on: October 05, 2010, 06:30:22 pm »
Yep, I figured out how to get the linked document into the generated document via the tick you mentioned. That in itself works nicely.

However, now I'm having big trouble in getting the heading numbering flow continuous from the "fixed" part to the generated part.

I've tried all the create list item and list override stuff as spelled out in the docs, but for some reason I just can't get it to work. I'm also managing to crash EA consistently every time I try to modify the levels... I guess I should write a bug report about that.

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: RTF documents, manual and generated
« Reply #7 on: October 10, 2010, 05:44:05 pm »
The secret to getting heading level numbering working is to use a base template with the header numbering in it. For instance I found it easier to create a MS Word template with Header 1, Header 2 etc then import it as a base template. Use that base template for all the parts of the document and the numbering will flow consistently. I originally tried to do this in the RTF editor in EA but wasted days trying to get to work.
« Last Edit: October 10, 2010, 05:46:40 pm by phenzell »
Happy to help
:)

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: RTF documents, manual and generated
« Reply #8 on: October 10, 2010, 05:45:49 pm »
On the crashing side of things may I suggest you send in a bug report and provide the model to Sparx so they can make EA more stable.  :)
Happy to help
:)