Book a Demo

Author Topic: Page Setup for Diagrams does not work  (Read 8043 times)

PatrickS

  • EA User
  • **
  • Posts: 46
  • Karma: +1/-0
    • View Profile
Page Setup for Diagrams does not work
« on: June 29, 2017, 06:49:08 pm »
I typically have a Package name and description followed by it's main diagram on one page and I set my template accordingly. The problem is that, yes, the diagram is one 1 page, but it doesn't leave space for my package heading etc. So I was happy to find in the diagram options under diagram -> Advanced -> Page Setup the possibility to limit the size available for diagrams, nearly exactly what I needed. So I used it, set enough space for toe Top Margin to allow the title to use this space. But it doesn't show any effect.
I might have misunderstood the idea of this Diagram's Page setup (even though the help describes it exactly as what I want: the space available for diagrams). But if so: how else can I possibly solve my problem?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Page Setup for Diagrams does not work
« Reply #1 on: June 29, 2017, 08:38:18 pm »
There's a Scale to one page option under Diagram/Advanced. Have you tried this?

q.

PatrickS

  • EA User
  • **
  • Posts: 46
  • Karma: +1/-0
    • View Profile
Re: Page Setup for Diagrams does not work
« Reply #2 on: July 10, 2017, 08:25:28 pm »
Yes that's what I mean, scale to 1 page would possibly reduce the size of the diagram but does not take into consideration that there is a title above. I want to display the title and use the rest of the page for the diagram.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Page Setup for Diagrams does not work
« Reply #3 on: July 11, 2017, 07:53:23 pm »
Patrick,

We use a small VBA macro to resize the images to just the right size so the title and name of the diagram fit to exactly one page.
In our case 23 was the right size for a portrait document.

Code: [Select]
Sub ResizeAllImages()

Dim oILShp As InlineShape

For Each oILShp In ActiveDocument.InlineShapes
    If oILShp.Height > CentimetersToPoints(23) Then
        oILShp.Width = ((CSng(oILShp.Height) / CentimetersToPoints(23)) * CSng(oILShp.Width))
        oILShp.Height = CentimetersToPoints(23)
    End If
Next
End Sub

Geert

f

  • EA Novice
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
Re: Page Setup for Diagrams does not work
« Reply #4 on: March 05, 2019, 03:14:41 am »
I stumbled about the same problem. After the title it creates a page break followed by the diagram scaled to full page size. I want to have the diagram smaller than the PDF size in a way that title and notes also fit on the same page.
Now I wonder how I should use your offered script.
I just know that I must go to Publish-->Report-->Documentation-->GenerateRichTextDocumentation. When and how should I call your script? Could you explain that in a few words, please? Thanks in advance.
« Last Edit: March 05, 2019, 03:16:17 am by f »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Page Setup for Diagrams does not work
« Reply #5 on: March 05, 2019, 03:26:25 am »
The VBA macro above is meant to be executed in Word, after the document has been generated.
(press Alt-F11 to open the VBA editor in Word)

Geert

f

  • EA Novice
  • *
  • Posts: 11
  • Karma: +1/-0
    • View Profile
Re: Page Setup for Diagrams does not work
« Reply #6 on: March 05, 2019, 03:40:25 am »
Awesome! This works with 22 for me. I miss the like button at your answer. ;)
Such diagram shrinking should be part of EA.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Page Setup for Diagrams does not work
« Reply #7 on: March 05, 2019, 04:24:53 am »
Awesome! This works with 22 for me. I miss the like button at your answer. ;)
You can use the Helpful/Not helpful links to indicate such.
It increases/decreases a users "Karma"

There is however a #posts threshold as to when you can vote on answers, but I believe you should be above that with 32 posts.

Geert