Book a Demo

Author Topic: Document generator.  (Read 7883 times)

Monsieur

  • EA User
  • **
  • Posts: 142
  • Karma: +0/-0
    • View Profile
Document generator.
« on: May 05, 2015, 12:57:12 am »
Hi,

Here come the day, a day without UI, a day where every document is generated as the customer want, a day of freedom for us all!

[size=36]I want to build a Document generator[/size]
YES i have read
http://www.sparxsystems.com/enterprise_architect_user_guide/11/automation_and_scripting/document_generator_interface.html
BUT i still need you.

Does some one have a clear example? is not that i can't do s**t. It's more that s**t is what i do.
I found so little on my books. Every lead, every information given to me, little soldier, will be rewarded with nothing more than the fullfilling feeling of transmitting knowledge, and a big smiley.
I appreciate help on this. Basic stuff is best. I'll get to complicated s**t later.

THANK YOU ALL

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Document generator.
« Reply #1 on: May 05, 2015, 07:30:42 am »
Good luck.
Personally I find the built in document generator for Sparx EA good enough to generate all my docs. Especially since document fragments were introduced in the more recent versions.
Interested in what you think it can't do. Please do share.
Happy to help
:)

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document generator.
« Reply #2 on: May 05, 2015, 01:19:38 pm »
Hi Monsieur,

I'm one of those people who wrote his own documentgenerator (twice even) for EA.
One in Word VBA (didn't have access to a reald IDE at the client) and one in C#.
I decided to write my own because the built-in RTF generator was not good enough for my requirements (back in the day).

Recently I started at this new client and they needed documents as well.
So I set out to explore my options, especially since they are on a very restricted Citrix environment.

After some experimenting and carefully considering all options I finally settled for the built-in RTF generator.
I never thought I would ever say this, but it is flexible enough to realize all my requirements.

I'm using a Virtual document with lots of Model Documents for all the different elements I want to include in my document.
For some special requirements (such as interpreting xml tags in the notes and in order to print the Dutch and French description in different columns) I'm using script and SQL fragments.

I also wrote a little script that creates the virtual document and all of the model documents so we don't have to do that manually.

I must admit, RTF document generator has come a long way since version 6.5  :D

Geert

Monsieur

  • EA User
  • **
  • Posts: 142
  • Karma: +0/-0
    • View Profile
Re: Document generator.
« Reply #3 on: May 05, 2015, 05:29:01 pm »
Quote
Good luck.
Personally I find the built in document generator for Sparx EA good enough to generate all my docs. Especially since document fragments were introduced in the more recent versions.
Interested in what you think it can't do. Please do share.
Roll back.
I might only need to custom the generation using the document generator and scripting.
Does some one have an exemple of script at hand-lenght and is willing to share?

Regards
M.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document generator.
« Reply #4 on: May 05, 2015, 06:21:26 pm »
I'll email you an example.

Geert

Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Document generator.
« Reply #5 on: May 06, 2015, 10:31:47 am »
Quote
Quote
Good luck.
Personally I find the built in document generator for Sparx EA good enough to generate all my docs. Especially since document fragments were introduced in the more recent versions.
Interested in what you think it can't do. Please do share.
Roll back.
I might only need to custom the generation using the document generator and scripting.
Does some one have an exemple of script at hand-lenght and is willing to share?

Regards
M.
I don't understand that answer could you elaborate?
Happy to help
:)

Monsieur

  • EA User
  • **
  • Posts: 142
  • Karma: +0/-0
    • View Profile
Re: Document generator.
« Reply #6 on: May 06, 2015, 05:22:46 pm »
Quote
Quote
Quote
Good luck.
Personally I find the built in document generator for Sparx EA good enough to generate all my docs. Especially since document fragments were introduced in the more recent versions.
Interested in what you think it can't do. Please do share.

Roll back.
I might only need to custom the generation using the document generator and scripting.
Does some one have an exemple of script at hand-lenght and is willing to share?

Regards
M.
I don't understand that answer could you elaborate?

After investigation i found out that using JS/VB script (within EA)+ EA.DocumentGenerator might be enough.  :D :D :D :D
Have some one an example with that? ;)


Ty geert, but doing a generator on my own seems a bit prematurate for my needs. I'll try that again if the DocumentGenerator class is not good enough to treat all my reports. ;D 8-)


Sunshine

  • EA Practitioner
  • ***
  • Posts: 1353
  • Karma: +121/-10
  • Its the results that count
    • View Profile
Re: Document generator.
« Reply #7 on: May 07, 2015, 05:30:31 pm »
I give up you still haven't explained what you think the built in doc generator can't do.
Sorry can't help you.
Happy to help
:)

Monsieur

  • EA User
  • **
  • Posts: 142
  • Karma: +0/-0
    • View Profile
Re: Document generator.
« Reply #8 on: May 07, 2015, 05:47:23 pm »
Quote
I give up you still haven't explained what you think the built in doc generator can't do.
Sorry can't help you.

I am going to use the built in generator! i just want to use-it in a script.

The EA.DocumentGenerator IS the built in generator, no?
I will just add my filters by scripting and not fragment and WYISWYG interface.

One example:
By doing this i should be able to generate reports AND update values/tags of my objects.

M.
« Last Edit: May 07, 2015, 05:55:03 pm by damien.reche »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document generator.
« Reply #9 on: May 07, 2015, 08:51:28 pm »
Quote
Quote
I give up you still haven't explained what you think the built in doc generator can't do.
Sorry can't help you.

The EA.DocumentGenerator IS the built in generator, no?
I will just add my filters by scripting and not fragment and WYISWYG interface.
No not exactly. EA.DocumentGenerator is the class you can use to write a document from scratch from within a script or add-in.

The built-in Generator is just the one that you use in the GUI when you press F8.
The built-in Generator however can use template fragments that use a script to get the data. (in this script you could do more then only return data of course)

Using Virtual document and template fragments you can do almost anything when it comes to generating documents.

What I wrote a script for was to create the virtual document, with all the model documents based on a selection of business processes.

The generation of the document is still standard EA functionality.

Geert


Monsieur

  • EA User
  • **
  • Posts: 142
  • Karma: +0/-0
    • View Profile
Re: Document generator.
« Reply #10 on: May 07, 2015, 11:24:26 pm »
Quote
Quote
Quote
I give up you still haven't explained what you think the built in doc generator can't do.
Sorry can't help you.

The EA.DocumentGenerator IS the built in generator, no?
I will just add my filters by scripting and not fragment and WYISWYG interface.
No not exactly. EA.DocumentGenerator is the class you can use to write a document from scratch from within a script or add-in.

The built-in Generator is just the one that you use in the GUI when you press F8.
The built-in Generator however can use template fragments that use a script to get the data. (in this script you could do more then only return data of course)

Using Virtual document and template fragments you can do almost anything when it comes to generating documents.

What I wrote a script for was to create the virtual document, with all the model documents based on a selection of business processes.

The generation of the document is still standard EA functionality.

Geert


Could i insert scripting in the fragment in order to modify my object as modifying a tag value or the version of the object?
If possible, how so?

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document generator.
« Reply #11 on: May 07, 2015, 11:36:02 pm »
Yes, you can execute a script in a script fragment.
Check the learning centre (Alt-F1) for an example.

What you do in this script is totally up to you. So if you decide to update an element or add a tagged value then that is what will be executed.

Geert