Author Topic: Document Generation - Links on diagram only  (Read 1642 times)

Matt

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Document Generation - Links on diagram only
« on: July 14, 2022, 09:17:27 pm »
Hello all,
it has been a long time since I was deep in EA land but I am back now and remembering how much fun it is and how good the community around it is...

I am trying to make sense of the document generator and I am wanting to do something that I think should be fairly simple and was wondering if some kind soul could point me in the right direction please.

I have a simple deployment diagram.  I have a bunch of nodes that are connected together with InformationFlow relationships.  On other diagrams there are lots of links from the Nodes to other things.

I would like to document the Node details and ONLY either the links that are visible on the current diagram, or even better only the InformationFlow relationships that are visible on the current diagram.

In the Section tool I can find that there is a diagram box [] and that from there I can get to connectors... but I then don't get to anything interesting as there is SourceColumns and TargetColumns.

Does this mean that I need to use some sort of fragment to detail the links that I want, please?
Ideally I want to add the details to a table showing something as simple as Source.Name and Target.Name...

I have tried looking through the documentation, and the forum to see if there was any obvious clues before asking but didn't manage to find anything that went far enough...

Very many thanks, in advance for any assistance provided...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12996
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation - Links on diagram only
« Reply #1 on: July 14, 2022, 09:48:21 pm »
Yeah, you probably want to use an SQL fragment to do that.
With such a fragment you can easily choose which element types and connector types you want to include.
You can even verify if the connector is visible on the diagram.

Geert

Matt

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Re: Document Generation - Links on diagram only
« Reply #2 on: July 14, 2022, 10:31:13 pm »
Thanks, Geert,
time to dig into SQL fragments and documents and see what I can do...
The SQL doesn't worry me, it's trying to make sense of the document generator that's causing all the 'fun' at the moment...
 ;D
All best...

Matt

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Re: Document Generation - Links on diagram only
« Reply #3 on: July 14, 2022, 11:42:07 pm »
I believe that my laptop will end up out of the window soon!
The query gives me what I want and what I expect...
But I can't get anything to show up in the template...
:#

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12996
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation - Links on diagram only
« Reply #4 on: July 15, 2022, 12:00:20 am »
If you post some images of your templates, and your query, we might be able to spot the error.

On thing that sometimes gets me are left-over filters in a template.

Geert

Matt

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Re: Document Generation - Links on diagram only
« Reply #5 on: July 15, 2022, 12:26:46 am »
Thanks again, Geert!
The first issue turned out to be that it was not picking up #DIAGRAMID#, which was down to the template not being in the right place (as I didn't think, from the Help, that templates could apply to diagrams)... Once I hard coded the value to experiment with I was able to start to generate some information...
I then ended up with duplicates, this was due to leaving some of the sections on that we effectively being generated by my fragment... and because I'd put it in the Element section it was running the fragment for each element - which caused a lot of duplication!

The only issue is now that the notes, which are in RTF in the model come out as HTML in the report.  This is not a showstopper, as they were only really experimentally RTF, so I can live with that not working...

Thanks for the nudges in the right direction, I hope that I can take it from here...

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 12996
  • Karma: +544/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Document Generation - Links on diagram only
« Reply #6 on: July 15, 2022, 04:07:17 am »
You have to use the "-Formatted" in the name of the column to show formatted text

Query (for SQL Server)

Code: [Select]
select o.note as [Description-Formatted] from t_object o
SQL Fragment
Code: [Select]
{Description.Formatted}
Geert

Matt

  • EA User
  • **
  • Posts: 96
  • Karma: +0/-0
    • View Profile
    • Solutions Reality
Re: Document Generation - Links on diagram only
« Reply #7 on: August 02, 2022, 06:37:09 pm »
Many thanks for this, Geert!
You are an absolute Hero!
This works exactly as hoped/expected...
(Sorry for the delay responding but have been on vacation and actually left computer off for a while!)
All best,
Matt