Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Add Diagram to Pages of DiagramDocument ? (Read 1754 times)
eXTruDEr
YaBB Newbies
*
Offline


Mind con Fusion ;-)

Posts: 7
Joined: Jun 14th, 2016
Add Diagram to Pages of DiagramDocument ?
Dec 5th, 2016 at 10:37am
Print Post  
Hello,

is it possible to add a Diagram to a DiagramDocument?
In my code Diagrams can be created dynamically. If wanted they should be grouped later. These diagrams are then to be written in a common PDF. According to the documentation, DiagramDocuments can be exported as PDF as well as a single Diagram.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Add Diagram to Pages of DiagramDocument ?
Reply #1 - Dec 5th, 2016 at 12:42pm
Print Post  
Hi,

You can only add a DiagramPage to document.Pages. The DiagramPage class inherits from Diagram, so you could use same code to populate it if generating diagrams dynamically. If you let your users draw diagrams interactively, you could use SaveToString/LoadFromString methods to transfer Diagram contents to a DiagramPage.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
eXTruDEr
YaBB Newbies
*
Offline


Mind con Fusion ;-)

Posts: 7
Joined: Jun 14th, 2016
Re: Add Diagram to Pages of DiagramDocument ?
Reply #2 - Dec 5th, 2016 at 1:07pm
Print Post  
thx 4 reply. Smiley

I found a simple solution for my problem: I just create DiagramPages instead of Diagrams.

Diagram dia = new Diagram(); => DiagramPage dia = new DiagramPage();
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint