DanilGholtsman
DanilGholtsman

Reputation: 2374

Sparx EA: create custom table while generating RTF

Is there are way by SparxEA's Document Generation tools create custom tables?

Problem:

Inside model, I got packages. Inside every package could be one/few diagrams. In every diagram could be Notes with text, from which I need to build tables(!).

I know that I can call template fragment from script (which called from other template fragment etc) like this

var documentGenerator = Repository.CreateDocumentGenerator();
documentGenerator.DocumentPackage(packageId, 9, "myFragment");

or use also something like this

documentGenerator.DocumentElement(elementId, 9, "myOtherFragment");

or any other function described here http://www.sparxsystems.com/enterprise_architect_user_guide/9.3/automation/document_generator_interface_class.html

and it would invoked our template, with described specfifc fileds or even determinated table (with constant coulmn names and count) inside

but...

Question

Is there any specific way of create custom tables (we couldnt know count of columns, we dont know names etc until we will process, as I mentioned above, diagram.Notes) while doing RTF documentation generation inside Sparx EA architect?

UPD 31.01.2017

So, the only way today is to build rtf generator by your own. Currently I am on it - building very simple RTF generator just to output table data. Decided to close the question for now, but will update it in future due to current progress on RTF scripting

Upvotes: 1

Views: 1206

Answers (1)

Geert Bellekens
Geert Bellekens

Reputation: 13711

The only way to create really custom tables is to use the new (v12.1?) Document Script template fragment With this type of fragment you have to call a script that returns raw RTF.

Seems best if you try to find some kind of RTF library to use, because writing RTF from scratch seems quite complex.

Upvotes: 2

Related Questions