Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: PatrickS on June 29, 2017, 06:49:08 pm

Title: Page Setup for Diagrams does not work
Post by: PatrickS 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?
Title: Re: Page Setup for Diagrams does not work
Post by: qwerty on June 29, 2017, 08:38:18 pm
There's a Scale to one page option under Diagram/Advanced. Have you tried this?

q.
Title: Re: Page Setup for Diagrams does not work
Post by: PatrickS 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.
Title: Re: Page Setup for Diagrams does not work
Post by: Geert Bellekens 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
Title: Re: Page Setup for Diagrams does not work
Post by: f 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.
Title: Re: Page Setup for Diagrams does not work
Post by: Geert Bellekens 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
Title: Re: Page Setup for Diagrams does not work
Post by: f 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.
Title: Re: Page Setup for Diagrams does not work
Post by: Geert Bellekens 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