Book a Demo

Author Topic: HTML report of diagrams only  (Read 3441 times)

steely1

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
HTML report of diagrams only
« on: October 04, 2023, 02:59:58 am »
I'd like to publish the diagram content of a model to HTML. Currently if I publish to HTML there are many pages of uninteresting object information alongside the diagrams.  I haven't seen any tickboxes to switch off the object information (blocks, TCs, Reqs, etc.) and publish only the diagrams.  Is there a way to do this?

philchudley

  • EA User
  • **
  • Posts: 750
  • Karma: +22/-0
  • EA Consultant / Trainer - Sparx Europe
    • View Profile
Re: HTML report of diagrams only
« Reply #1 on: October 04, 2023, 08:36:21 pm »
With EA open and a repository open:

1) Click the Resources tab in the Browser
2) Right-click HTML Publishing and select Create HTML Template
3) Provide a name for your template, for example Diagram Only
4) Click on the section named Body - Diagram and you will see the following in the editor

<div class="PageBody">
   <div class="diagram_image"> #IMAGE# </div>
   <div class="ObjectTitle">#NAME# : #TYPE# diagram</div>
   <table border="0" cellpadding="0" cellspacing="0" class="ObjectDetails">
      <tr>
         <td width="15%" class="ObjectDetailsTopic">Created:</td>
         <td width="85%" class="ObjectDetailsValue">#CREATEDATE#</td>
      </tr>
      <tr>
         <td width="15%" class="ObjectDetailsTopic">Modified:</td>
         <td width="85%" class="ObjectDetailsValue">#MODDATE#</td>
      </tr>
      <tr style="padding-top: 10px;">
         <td width="15%" class="ObjectDetailsTopic"><button onclick="switchProjectProperties()"><img src="#IMAGES#/plus03.gif" align="absmiddle" id="proj" /></button>Project:</td>
         <td width="85%" class="ObjectDetailsValue"></td>         
      </tr>
      <tr id="proj00" style="display: none;">
         <td width="15%" class="ObjectDetailsTopic" style="padding-left: 18px;">Author:</td>
         <td width="85%" class="ObjectDetailsValue">#AUTHOR#</td>
      </tr>
      <tr id="proj01" style="display: none;">
         <td width="15%" class="ObjectDetailsTopic" style="padding-left: 18px;">Version:</td>
         <td width="85%" class="ObjectDetailsValue">#VERSION#</td>
      </tr>
      <tr>
         <td width="15%" class="ObjectDetailsTopic"><button onclick="switchAdvancedProperties()"><img src="#IMAGES#/plus03.gif" align="absmiddle" id="adv" /></button>Advanced:</td>
         <td width="85%" class="ObjectDetailsValue"></td>         
      </tr>
      <tr id="adv00" style="display: none;">
         <td width="15%" class="ObjectDetailsTopic" style="padding-left: 18px;">ID:</td>
         <td width="85%" class="ObjectDetailsValue">#GUID#</td>
      </tr>
   </table>
   #NOTE#
</div>

5) Delete everything except line 2 <div class="diagram_image"> #IMAGE# </div>

This should leave:

<div class="PageBody">
   <div class="diagram_image"> #IMAGE# </div>
</div>

6) Click Save then Close

When you generate the HTML change the Style from <default> to your template name and all should be fine

Hope this helps

Phil
Models are great!
Correct models are even greater!

steely1

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: HTML report of diagrams only
« Reply #2 on: October 05, 2023, 08:10:16 pm »
I gave this a go but it only removed the fluff from the diagram pages. What I was looking for was to exclude all non-diagram pages from the report.  Perhaps there's something in one of the HTML templates that drives this or it's in EA itself.
The short term workaround I'll go with adopts your suggestion of ripping out the HTML template data . I've applied it to the various "Body -..." and "Constraint..." "Link..." template items.  This leaves me with the diagrams I want plus a bunch of mostly-empty pages (UC elements, etc.) with functional hyperlinks on the left panel.  Good enough to keep going!