Author Topic: Specific Diagram in Template  (Read 2294 times)

rupertkiwi

  • EA User
  • **
  • Posts: 31
  • Karma: +3/-0
    • View Profile
Specific Diagram in Template
« on: May 24, 2017, 10:14:46 am »
Hi,

I am trying to generate a document using a template for a specific diagram.

Does anyone know a way of doing this?

I have tried using various filters in the template but can't seem to get it working.
Is it possible to do this using SQL and the diagram ID or name?

Thanks,
Rupert

AndyJ

  • EA User
  • **
  • Posts: 332
  • Karma: +5/-2
  • It's only a model
    • View Profile
Re: Specific Diagram in Template
« Reply #1 on: May 24, 2017, 11:50:58 am »
Sorry Rupert,

I don't understand your question.

If you are trying to integrate a specific diagram into a document, so that you can get that document to "refresh" and pull in the latest version of the diagram from EA, then I'd recommend that you have a look at EADocX (an add-in which achieves that kind of document integration).

If not, can you explain what you're trying to achieve in a different way?

Andy

PS. Ian, I should get commission.  ;D
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

rupertkiwi

  • EA User
  • **
  • Posts: 31
  • Karma: +3/-0
    • View Profile
Re: Specific Diagram in Template
« Reply #2 on: May 24, 2017, 12:50:10 pm »
Hi Andy,

Yes, I want to create a document which has several different diagrams in it but from different parts of a model.

That's why I want to 'choose' each diagram, I don't want all of them, only a select few.

Thanks,
Rupert

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 8623
  • Karma: +211/-26
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Specific Diagram in Template
« Reply #3 on: May 24, 2017, 04:52:54 pm »
Unfortunately you cannot use SQL or Script fragments to get the image of the single diagram in your document.

Using virtual documents however you have the choice to either use element/diagram or package/diagram (depending on where your diagram is located)

You'll just have to make sure that the diagram you are after is either the only one under that element or diagram, or that it is the only one of a specific type (so you can filter the other types away in the template options)

In order to specify a package in a model document in your virtual document you can drag the package to the model document on a diagram. In order to specify a specific element I use a search called ElementByGUID who selects a single element based on it's GUID.

Mor information on my approach to document generation, and the things I've explained here ar on this article on my website: https://bellekens.com/2015/11/12/tutorial-generate-complex-documents-from-enterprise-architect-with-a-two-step-semi-automated-approach/

Geert

AndyJ

  • EA User
  • **
  • Posts: 332
  • Karma: +5/-2
  • It's only a model
    • View Profile
Re: Specific Diagram in Template
« Reply #4 on: May 25, 2017, 03:42:30 pm »
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1200
  • Karma: +10/-3
  • Read The Help!
    • View Profile
Re: Specific Diagram in Template
« Reply #5 on: May 25, 2017, 04:13:40 pm »
Maybe you should change your by-line to read:

Sun Tzu - "If you sit by the river long enough, eventually everyone will take your hint to use EADocX."
Best Regards, Roy

peterc

  • EA User
  • **
  • Posts: 50
  • Karma: +4/-0
    • View Profile
Re: Specific Diagram in Template
« Reply #6 on: May 25, 2017, 07:18:44 pm »
Do you need it to be dynamically generated from SQL?
If you need is satisfied by static diagrams then you can drag and drop the diagrams you want onto another diagram - Choose the Diagram Frame option when you drop it.

AndyJ

  • EA User
  • **
  • Posts: 332
  • Karma: +5/-2
  • It's only a model
    • View Profile
Re: Specific Diagram in Template
« Reply #7 on: June 06, 2017, 01:18:04 pm »
Maybe you should change your by-line to read:

Sun Tzu - "If you sit by the river long enough, eventually everyone will take your hint to use EADocX."

 ;D
Sun Tzu: "If you sit by the river long enough, eventually the body of MS Visio floats past."