Book a Demo

Author Topic: [EA12] Model Document Name in report  (Read 7087 times)

pieter.vanderzwet

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
[EA12] Model Document Name in report
« on: July 27, 2018, 06:13:22 pm »
To generate documents from our models we have used a simple structure: no scripts, just a Master Document with a number of model documents. Each Model document originally was a Level 1 chapter in the generated document. Originally each model document had exactly one package, whose name was then the Level 1 chapter name. As multiple projects were using the same model, we wanted more flexibility and we started adding more than one package to a single model document: each project selected the packages applicable for that project. To prevent that we ended with a lot Level 1 chapters we modified the associated template: Each inserted package generated a level 2 chapter, and we had to hardcode the Level 1 chapter name in the template. That led to a number of very similar templates, that only differ in the name of the Level 1 chapter.
Like this (copy from exported rtf):

1   Component Model

package >
1.1   {Pkg.Name}
package element >
{PkgElement.Notes}
linked document >
< linked document
< package element
diagram >
{Diagram.Name}
{Diagram.DiagramImg}
{Diagram.Notes}
< diagram
element >
{Element.Name}
{Element.Notes}
method >
Method   Notes   Parameters
{Meth.Name}

{Meth.Type}
{Meth.Notes}
parameter >
{MethParameter.Name} : {MethParameter.Type}
< parameter
< method
diagram >
{Diagram.Name}
{Diagram.DiagramImg}
{Diagram.Notes}
< diagram
linked document >
< linked document
child elements >
< child elements
< element
child packages >
< child packages
< package



What would be nice of the name of the model document that generates the chapter could be used as the name of the Level 1 chapter. So instead of the fixed "Component Model" above use the name of the generating model document. Easy to explain to my collegues, no maintenance hassle.
Another approach I used is to use Insert Data Field as Level 1 chapter. But how can I set this within the model to a specific value, without changing the template? I have experimented with that approach but did not get what I want.

Are there other possibilities?

I hope I made myself clear in what I want and hope for your response

Pieter

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: [EA12] Model Document Name in report
« Reply #1 on: July 30, 2018, 01:42:42 pm »
Have you tried using the 'Report Name', 'Report Title'  fields of 'Model Document' element? You can insert these fields from Report Constants

pieter.vanderzwet

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: [EA12] Model Document Name in report
« Reply #2 on: July 30, 2018, 05:15:44 pm »
I Did. But then the name of the Master Document (of which this document is part) appears

Nizam

  • Prolab Moderator
  • EA User
  • *
  • Posts: 320
  • Karma: +15/-2
  • Model Sharing - Simplified
    • View Profile
    • Professional Model Collaboration
Re: [EA12] Model Document Name in report
« Reply #3 on: July 31, 2018, 02:53:03 am »
Ah, I missed that. I don't see a way to do that at the moment other than using a Document Script to iterate thorugh the model documents,

Maybe a feature request?

pieter.vanderzwet

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: [EA12] Model Document Name in report
« Reply #4 on: August 28, 2018, 10:30:37 pm »
I have found a workaround that is not too complicated and allows a neat way to create the documents I want.
I have a limited number of templates: like "Pictures Only", "Pictures and Elements", "Pictures Elements Method", etc.
They originally used a heading 1 for the main package (the package included in the associated model document) but now I changed that in heading 2.
Then I made another template called "Heading 1 Title". It looks like this:

package >
1   {Pkg.Name}
package element >
{PkgElement.Notes}
linked document >
< linked document
< package element
diagram >
{Diagram.Name}
{Diagram.DiagramImg}
{Diagram.Notes}
< diagram
< package

Without the usual child elements it only exports the highest level information of the package to the document, allowing me the differentiate between the information at heading 1 level and the content at heading 2 level (all packages with model information)

So my Master document and modeldocuments look like:
Master Document contains:
  • Model Document Title chapter 1 (template: Heading 1 Title)
        Package Main A
  • Model document Content (Template e.g Pictures Elements)
         Package a1
         Package a2
         Package a3
  • Model Document Title chapter 2 (template: Heading 1 Title)
        Package Main B
  • Model document Content (Template e.g Pictures Elements Methods)
         Package b1
         Package b2
         Package b3
  • etc...

This gives me enough flexibility to create different document from the same model. Next, for even more versability: Scripting!!