Page Index Toggle Pages: 1 ... 18 19 [20] 21  Send TopicPrint
Locked Topic Link between two nodes (Read 129278 times)
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #285 - Sep 1st, 2014 at 6:05am
 
I have another one question, I have generated one VISIO file and which looks correct in VISIO professional 2013 but not in VISIO 2010 Professional so can you tell me reason behind this.

I have attached file, please check.
  

TTLB151-procedure_division.zip (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #286 - Sep 1st, 2014 at 11:07am
 
shrinivas wrote on Sep 1st, 2014 at 5:38am:
I am using like this dc.CreateImage().Save(sFilePath); so i am not able to understand viewport argument.


Use the CreateImage (RectangleF viewport, float scale) method mentioned above.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #287 - Sep 2nd, 2014 at 8:49am
 
shrinivas wrote on Sep 1st, 2014 at 6:05am:
I have another one question, I have generated one VISIO file and which looks correct in VISIO professional 2013 but not in VISIO 2010 Professional so can you tell me reason behind this. I have attached file, please check.


What part does not look correct? I cannot see any substantial differences:

  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #288 - Sep 10th, 2014 at 12:40pm
 
I am generating VISIO having multiple tabs i.e 100 and every tab having 200 to 300 nodes so how much time it takes approximately?.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #289 - Sep 10th, 2014 at 12:44pm
 
shrinivas wrote on Sep 10th, 2014 at 12:40pm:
I am generating VISIO having multiple tabs i.e 100 and every tab having 200 to 300 nodes so how much time it takes approximately?.


Basically it takes long time while exporting VISIO file from Export() method.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #290 - Sep 10th, 2014 at 2:38pm
 
Quote:
I am generating VISIO having multiple tabs i.e 100 and every tab having 200 to 300 nodes so how much time it takes approximately?.


This shows 15 seconds on my system and generates 1MB big file, so a hundred pages of similar size would take at least 25 minutes for 100MB file:

Code
Select All
void TestVisioExportTime()
{
	for (int i = 0; i < 300; i++)
		diagram.Factory.CreateShapeNode(i * 30, 10, 20, 20).Text = "test";

	var startTime = DateTime.Now;
	new VisioExporter().Export(diagram, @"D:\test.vdx");
	Debug.WriteLine(DateTime.Now - startTime);
} 

  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #291 - Sep 11th, 2014 at 3:59am
 
On my machine its taking more than 12 hrs for 100 files I am using below code,

public bool GenerateBulkVisioFile(ArrayList alXMLFileWithPath, string sXMLFilePath, string sProgramName, string sDatabaseName = "")
        {
            string sVDXFilePath = "";
            Diagram dc = new Diagram();
            var visioDoc = new XmlDocument();
            VisioExporter vex = new VisioExporter();
            var diagDoc = new XmlDocument();
            var doc = new DiagramDocument();
            var page = new DiagramPage();
            var page1 = new DiagramPage();
            int iObjCounter;
            clsDataBase objDataBase = new clsDataBase();
                try
                {
                    objDataBase.ReadSettingsXML(Application.StartupPath + "\\Settings.xml");
                    if (ClsGlobal.gsDBName.ToUpper() == "TECHDB" && sDatabaseName.ToUpper()=="")
                    { ClsErrorLog.ErrorLog("Started Processing files for Program flow", "", 2); }
                    else
                    {
                        ClsGlobal.gsDBName = sDatabaseName;
                        objDataBase.InsertIntoSearch_Service_ErrorLog(System.Reflection.MethodBase.GetCu
rrentMethod().Name, "Message--Started Processing files for Program flow", DateTime.Now.ToString("dd-MMM-yyyy hh:mm:ss tt"));
                    }

                    sVDXFilePath = sXMLFilePath + "\\" + sProgramName + ".VDX";
                    for (iObjCounter = 0; iObjCounter < alXMLFileWithPath.Count; iObjCounter++)
                    {
                        var objDiagPage = new DiagramPage();
                        objDiagPage.LoadFromXml("E:\\Codes\\S2T_VISIO\\S2T_VISIO\\S2T_VISIO\\bin\\XML\\"
+alXMLFileWithPath[iObjCounter].ToString());
                        MindFusion.Diagramming.Layout.DecisionLayout dl = new MindFusion.Diagramming.Layout.DecisionLayout();
                        dl.Orientation = MindFusion.Diagramming.Layout.Orientation.Vertical;
                        dl.HorizontalPadding = 10;
                        dl.VerticalPadding = 10;
                        objDiagPage.ArrangeLinkLabels();
                        objDiagPage.Title = System.IO.Path.GetFileNameWithoutExtension(alXMLFileWithPath[iObjCounter].ToString());
                        doc.Pages.Add(objDiagPage);
                        dl.Arrange(objDiagPage);
                    }
                    vex.ExportInvisibleItems = false;
                    vex.ExportTablesAsGroups = true;
                    vex.DynamicsOff = true;
                    vex.Export(doc, sVDXFilePath);

                    if (ClsGlobal.gsDBName.ToUpper() == "TECHDB" && sDatabaseName.ToUpper() == "")
                    { ClsErrorLog.ErrorLog("End Processing files for Program flow", "", 2); }
                    else
                    { objDataBase.InsertIntoSearch_Service_ErrorLog(System.Reflection.MethodBase.GetCu
rrentMethod().Name, "Message--End Processing files for Program flow", DateTime.Now.ToString("dd-MMM-yyyy hh:mm:ss tt")); }
                    return true;
                }
                catch (Exception ex)
                {
                    ClsErrorLog.ErrorLog(System.Reflection.MethodBase.GetCurrentMethod().Name, ex.Message);
                    return false;
                }
                finally
                {
                    diagDoc = null;
                }
        }


Can you tell me any mistake in this code?
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #292 - Sep 11th, 2014 at 4:12am
 
Here all time taken for vex.Export(doc, sVDXFilePath); this function.

I have 104 XML that I am loading and adding to document and then exporting to .VDX format.
If you want that 104 XML then i will send you just advise me how I can upload these XML because its size is 5 MB after zip
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #293 - Sep 11th, 2014 at 6:16am
 
Your time logs also include the time to load XMLs and run layout algorithm from what I can see. Please email the file to support@mindfusion.eu; Is E:\ a local drive or network-mapped one?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #294 - Sep 11th, 2014 at 9:49am
 
Apart from the 300 nodes, your diagrams contain 1200 links per page. With them it takes about two minutes to export a single-page VDX, so it will take more than three hours for the 104 pages. We are testing it from a desktop application; if you run export from IIS it might be throttling down the thread speed to avoid starving other web server requests and make it even slower. We could probably optimize VisioExporter a bit and add some multi-core support, but your scenario will still take a long time to process, so you'll need to present it at as a long-running batch job to your users anyway. Also they will have to download a 500MB file if you want to put everything in the same VDX.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #295 - Sep 12th, 2014 at 4:12am
 
How Is it possible within 3 hours? when we are processing this on our side Its taking 16 hours and after that It throws exception memory out of range or we can say stack overflow in general language.

As per my observation time is increasing in multiple times for ex I have processed 65 files lot then It will take 4 hours then why I am not able to process 104 files lot.
If we think logically It should complete In 7 hours (approx.)

Actually the problem is in EXPORT () function.
please tell me some solution on this.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #296 - Sep 12th, 2014 at 8:04am
 
It probably gets slow because the system starts to use virtual memory and does a lot of page swapping. The 500 MB final Vdx file probably takes more than a GB when presented as in-memory XML DOM tree, and you also have all the diagrams loaded in memory too while the DiagramDocument is being exported, so you get an out-of-memory exception when you reach the 2 GB limit per process. A solution is to export the diagrams as separate files. Then if you really want them merged into a single Vdx, you could use the XML DOM API to move the VisioDocument/Pages/Page XML element from each separate Vdx file into the first file, assigning new ID attribute values to the added Page elements. That will need a lot of memory too, but at least you won't have to keep the Diagram objects loaded while merging the files.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #297 - Sep 12th, 2014 at 2:20pm
 
Try this version, it should export individual diagrams faster:
https://mindfusion.eu/_beta/netdiag531.zip

The 300 nodes + 1200 links one takes about 30 seconds now, so if you export all diagrams as individual files the 104 files should finish in less than an hour (excluding load and layout times). We can't see any way to reduce the memory footprint, so it will still slow down if you try to export a 100-page DiagramDocument once the in-memory XML document gets very large and the system starts paging.
  
Back to top
 
IP Logged
 
shrinivas
Full Member
***
Offline


I Love MindFusion!

Posts: 169
Joined: May 21st, 2014
Re: Link between two nodes
Reply #298 - Sep 16th, 2014 at 8:27am
 
I have attached one XML that i am trying to load with help of MindFusion functions .
But Its taking long time to display diagram on webpage and exception occurs, i wll atatch exception details image and after that on web page nothing is displayed.

dl.Arrange(DiagramView1.Diagram); Its taking long time, please check and let me know solution.
  

ajay_DataFlowDiagram_15Sep2014_071058PM.zip (Attachment deleted)
Exception_002.jpg (Attachment deleted)
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link between two nodes
Reply #299 - Sep 17th, 2014 at 8:47am
 
Is "dl" a DecisionLayout instance? This takes 3-4 seconds in my test:

Code
Select All
diagram.LoadFromXml("ajay_DataFlowDiagram_15Sep2014_071058PM.XML");
new DecisionLayout().Arrange(diagram); 



Are you running anything else after Arrange?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1 ... 18 19 [20] 21 
Send TopicPrint