Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: BruceTOGAF2 on December 13, 2017, 02:05:25 am
-
I am using docGenerator.DocumentDiagram( currentDiagram.DiagramID, 0, myRtfTemplateFragment) to "print" large diagrams in an RTF document.
After the RTF document has been built, I have to resize each diagram to fit neatly into an A4 page.
How can I force docGenerator to "print" those diagrams within the bounds of an A4 page?
In Tools, Options, Diagrams, Default Page Size is 'A4 Sheet, 210- by 297-millimeters'
In Tools, Options, Diagrams, Diagram Frames, there is a check box 'On printed Images'
In Tools, Options, Diagrams, General, there is a check Box 'Zoom to best scale'
In Tools, Options, Diagrams, I cannot find a check Box for 'Zoom to best scale' On printed Images
-
On the diagram properties there is
Diagram | Document Generation Options | Divide Diagram into multiple pages
I think that might be what you are looking for.
Geert
-
I am using docGenerator.DocumentDiagram( currentDiagram.DiagramID, 0, myRtfTemplateFragment) to "print" large diagrams in an RTF document.
Hi Geert,
I am not looking for dividing diagrams. I am looking for a method to shrink each diagram so that it fits into the A4 age.
-
I am using docGenerator.DocumentDiagram( currentDiagram.DiagramID, 0, myRtfTemplateFragment) to "print" large diagrams in an RTF document.
Hi Geert,
I am not looking for dividing diagrams. I am looking for a method to shrink each diagram so that it fits into the A4 age.
If you leave that unchecked I think it should do just that (as in not divide over multiple pages)
Geert
-
Hi Geert
On the diagram properties there is
Diagram | Document Generation Options | Divide Diagram into multiple pages
I checked this checkbox to see what would happen. Diagram did divide over multiple pages.
Then I left this unchecked to see what would happen. I can only see a part of the diagram. To reveal the full diagram I have to (in MS-Word) manually shrink the diagram size to fit the page.
I am looking for a way of automatically (in Sparx) shrinking the diagram size to fit the page.
-
Ah, I see.
The weird thing is that, when using regular document generation this behavior is standard.
All my diagram are shrunk to exactly the size of a page.
Could it be that the document generator behaves differently when executed from script?
I would take that up with Sparx support.
Anyway, as a workaround you could write a little macro in Word to resize the images. If you search the forum you'll find one that I posted a while ago to do just that.
We actually wanted the diagram to be a little bit smaller than a whole page so the caption would stay on the same page.
Geert
-
In diagram properties , Advanced Im using "Scale to 1 page" who works good, Using EA 13.51
When large and wide diagram Im selecting Rotate Image in Diagram Properties.
Its works as expected with normal Doc generation :)
Maybe works different with scripts
-
Hi Bruce,
This sounded familiar - so I looked up my old threads and found this: http://www.sparxsystems.com/forums/smf/index.php/topic,5903.msg127212.html#msg127212
It looks like it was reported as a bug some time ago, but the reported didn't mention the bug number.
It may be worth reporting as a bug again. I've moved to using virtual documents for most of my documentation, but I also use CustomDocument fragments, but not yet for diagrams, so I don't know if it fails within a CustomDocument fragment script.
Yours,
Screwtape.
-
I tried a recommendation from Colin Coates, a fellow member of LinkedIn Group 'Enterprise Architect (Sparx Systems) User Group'
I tried right-clicking each diagram and then setting the radio-button you see by clicking through Properties|Diagram|Advanced|Scale to 1 Page?
This has made no difference.
I fail to see how switching to Virtual Documents would make any difference.
Looks like a bug in Sparx EA 12.