- Welcome, Guest. Please Login or Register
MindFusion  
  Version 2 of our Xamarin Calendar component adds Resource view and support for Universal Windows Platform. Now beta testing spreadsheet component for Java Swing. We have released our Java Swing Pack.  
  HomeHelpSearchLoginRegister   
     
     
   
 
Page Index Toggle Pages: 1 Send Topic Print  
How do i save a single custom node?
Read 37 times

chowy   Offline
YaBB Newbies
*
Posts: 28
I Love MindFusion!


   
     
 
How do i save a single custom node?
Jul 17th, 2017 at 2:50am
 
Now I need to store a custom node on my diagram into the database, so I want to serialize the node to save it. However, I did not find a suitable way to save a single custom node. Do you have any good suggestions? I also need to export a single node to jpeg, bmp, dxf and so on.
 
 
« Last Edit: Jul 17th, 2017 at 10:29am by chowy »
 
IP Logged    
 
     

Slavcho   Offline
God Member
*****
Posts: 1057
Gender: male
tech.support


   
     
 
Re: How do i save a single custom node?
Reply #1 - Jul 17th, 2017 at 12:28pm
 
You could clone it into a temporary diagram and save / export the latter -

Code:
var tempDiag = new Diagram();
tempDiag.Nodes.Add(node.Clone(false));

var doc = new XmlDocument();
tempDiag.SaveToXml(doc);

var xml = doc.SelectSingleNode("Diagram/Nodes").InnerXml;
Debug.WriteLine(xml);

new PdfExporter().Export(tempDiag, "..."); 



Regards,
Slavcho
 
 
 
IP Logged    
 
     
Page Index Toggle Pages: 1 Send Topic Print