Author Topic: Technology Templates  (Read 3711 times)

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Technology Templates
« on: March 09, 2020, 10:06:07 pm »
Is there a way to see the Technology Templates under Resources/Document Generation.
I use EA 15.1 and I can select them for generating documents, but they are not visible under resources.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13239
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Technology Templates
« Reply #1 on: March 09, 2020, 11:04:34 pm »
They should be visible under Resources | Document Generation | <Your Technology>

Geert

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Technology Templates
« Reply #2 on: March 09, 2020, 11:07:03 pm »
They should be visible under Resources | Document Generation | <Your Technology>

Geert

It works after I snipped the templates part out of the MDG file and imported it as refdata...

I still have another problem. I created some Cover pages, but when generating a document I can't select/find them in the Cover Page dropdown list.

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Technology Templates
« Reply #3 on: March 09, 2020, 11:40:59 pm »
They should be visible under Resources | Document Generation | <Your Technology>

Geert

What's the reason that this is not always visible in EA 15.1? Sometimes it is, sometimes it isn't...

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Technology Templates
« Reply #4 on: March 10, 2020, 02:39:58 am »
Hi Matthias,


Unfortunately, distribution of document generation templates is a mess. Cover pages and style sheets are handled differently from regular templates / fragments, and linked documents are handled differently again.
Here's a breakdown. Not much blood, but buckets of sweat and tears went into this.
  • Regular templates / fragments can be included in an MDG Technology.
    They are referenced by name in the DocumentGenerator API.
    They are listed in Resources under    Document Generation -- <MDG_tech_name> -- <Template_group_name>.
    The contents of an MDG Technology are not present in the project where they're used and are thus safe from accidental or malicious tampering (although possibly they are present if you import the technology rather than reference it, not sure; it's also possible that an imported technology shows up in Resources under MDG Technologies instead of Document Generation).
  • Linked document templates can be included in an MDG Technology.
    I don't think they can be used in the API. The methods to manipulate linked documents are in Element, which only allows the creation of a linked document by loading it from a file, not by creating it from a template. (Feature request?)
    They are listed in Resources under     Document Generation -- Linked Document Templates -- <MDG_tech_name>     (so no group name there).
  • Cover pages, style sheets and table-of-content templates must be distributed as reference data.
    They are referenced by name in the API.
    They are listed in Resources under     Document Generation -- User Templates -- <Template_group_name>     (see below for details on template groups).
    Reference data does exist in the project where it's used, and can be edited and deleted there.
  • A linked document which is used in DocumentGenerator.InsertLinkedDocument() (usually to set the document header/footer) must be distributed as model content.
    It is referenced by element GUID in the API.
    It is not listed in Resources, but located somewhere in the project browser.
    Model content is obviously also present in the target project and can be edited and deleted there.
So, yeah. Bit messy.

The fiddly bit (well, one fiddly bit, it's all fiddly bits) when distributing templates as reference data is the template group.

You want to make sure that your cover pages, style sheets and tables of contents are in a separate template group (in your source project) from those that you will distribute as part of the technology. I usually name that group "<MDG_tech_ID> RefData"; you may want to pick something more end-user friendly because it shows up in the GUI. You can have more than one if you want.

If in the target project you import reference data which contains templates which claim to be in the same group as the ones from an MDG Technology, or an empty group, I think EA could get confused. Maybe that's what's happened to you.

HTH,


/Uffe
My theories are always correct, just apply them to the right reality.

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Technology Templates
« Reply #5 on: March 10, 2020, 02:42:00 am »
Tank you Uffe. I noticed that there are soms bugs in 15.1 regarding the document generation.

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Technology Templates
« Reply #6 on: March 10, 2020, 02:45:56 am »
Tank you Uffe. I noticed that there are soms bugs in 15.1 regarding the document generation.
Please don't tell me that. I noticed a number of bugs in 15.0 and the only response I got was "upgrade".  :'(

/U
My theories are always correct, just apply them to the right reality.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13239
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Technology Templates
« Reply #7 on: March 10, 2020, 04:23:40 am »
Uffe,

I was able to put both cover pages and stylesheet in MDG technologies just fine?

I actually never had any issues with those at all. Can you explain why/when it didn't work for you?

Geert

Uffe

  • EA Practitioner
  • ***
  • Posts: 1859
  • Karma: +133/-14
  • Flutes: 1; Clarinets: 1; Saxes: 5 and counting
    • View Profile
Re: Technology Templates
« Reply #8 on: March 10, 2020, 06:10:29 pm »
In 13.5 I couldn't access MDG-packaged cover pages, style sheets or tables of contents through DocumentGenerator().

I haven't tried it since upgrading to 15.0, but I haven't seen anything in the history which would indicate this has changed.

/U
My theories are always correct, just apply them to the right reality.

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Technology Templates
« Reply #9 on: March 10, 2020, 06:48:16 pm »
I downgraded to 15 instead of 15.1. The first time I opened EA, the technology templates are visible under Resources | Document Generation | <Your Technology>. But the second time they aren't.
Very frustrating...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13239
  • Karma: +553/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Technology Templates
« Reply #10 on: March 10, 2020, 07:02:06 pm »
I downgraded to 15 instead of 15.1. The first time I opened EA, the technology templates are visible under Resources | Document Generation | <Your Technology>. But the second time they aren't.
Very frustrating...
I've seen stuff like that in the past. Do you have the same MDG loaded in another way (once imported into the model and once via a file)?
IIRC correctly these kind of issues came up when having MDG conflicts.

Geert

MatthiasVDE

  • EA User
  • **
  • Posts: 196
  • Karma: +1/-0
    • View Profile
Re: Technology Templates
« Reply #11 on: March 10, 2020, 07:05:02 pm »
I downgraded to 15 instead of 15.1. The first time I opened EA, the technology templates are visible under Resources | Document Generation | <Your Technology>. But the second time they aren't.
Very frustrating...
I've seen stuff like that in the past. Do you have the same MDG loaded in another way (once imported into the model and once via a file)?
IIRC correctly these kind of issues came up when having MDG conflicts.

Geert

I only imported it in the model via "Import MDG Technology".