Quote:DecisionLayout is designed to work with up to 4 links per node, you have 30-40 links for several nodes and some links are ignored. You have many links connecting to the end node, so one thing you could do is divide it into several end nodes, e.g. each having at most 7-8 incoming links.
This is no possible.
Quote:Otherwise you could find the unprocessed diagonal links by checking for SegmentCount == 1 and different X/Y coordinates for StartPoint and EndPoint, and then call their Route() method to make sure they go around nodes.
I am not generating this VISIO totally programatically, so please check first XML and then tell me is it possible from XML and If not then I am going to post my code so please suggest changes in my code.
public bool GenerateVisioFile(string sXMLFilePath,string sDatabaseName="")
{
string sVDXFilePath = "";
Diagram dc = new Diagram();
var visioDoc = new XmlDocument();
VisioExporter vex = new VisioExporter();
var diagDoc = new XmlDocument();
clsDataBase objDataBase = new clsDataBase();
try
{
objDataBase.ReadSettingsXML(Application.StartupPath + "\\Settings.xml");
if (ClsGlobal.gsDBName.ToUpper() == "TECHDB" && sDatabaseName.ToUpper() == "")
{ ClsErrorLog.ErrorLog("Started Processing files for VISIO", "", 2); }
else
{
ClsGlobal.gsDBName = sDatabaseName;
objDataBase.InsertIntoSearch_Service_ErrorLog(System.Reflection.MethodBase.GetCu
rrentMethod().Name, "Message--Started Processing files for VISIO", DateTime.Now.ToString("dd-MMM-yyyy hh:mm:ss tt"));
}
sVDXFilePath = System.IO.Path.GetDirectoryName(sXMLFilePath) + "\\" + System.IO.Path.GetFileNameWithoutExtension(sXMLFilePath) + ".VDX";
dc.LoadFromXml(sXMLFilePath);
dc.SaveToXml(sXMLFilePath);
MindFusion.Diagramming.Layout.DecisionLayout dl = new MindFusion.Diagramming.Layout.DecisionLayout();
dl.Orientation = MindFusion.Diagramming.Layout.Orientation.Vertical;
dl.HorizontalPadding = 10;
dl.VerticalPadding = 10;
dl.Arrange(dc);
vex.ExportInvisibleItems = false;
vex.ExportTablesAsGroups = true;
vex.DynamicsOff = true;
vex.Export(dc, sVDXFilePath);
visioDoc.Load(sVDXFilePath);
dc.SaveToXml(diagDoc);
var diagElement = visioDoc.ImportNode(diagDoc.DocumentElement, true);
visioDoc.DocumentElement.AppendChild(diagElement);
visioDoc.Save(sVDXFilePath);
visioDoc.Load(sVDXFilePath);
if (ClsGlobal.gsDBName.ToUpper() == "TECHDB" && sDatabaseName.ToUpper() == "")
{ ClsErrorLog.ErrorLog("End Processing files for VISIO", "", 2); }
else
{ objDataBase.InsertIntoSearch_Service_ErrorLog(System.Reflection.MethodBase.GetCu
rrentMethod().Name, "Message--End Processing files for VISIO", 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;
}
}
Quote:Processed links overlap nodes when there's no enough space to fit all links at a LinkPadding distance between the nodes. You could either set larger HorizontalPadding and VerticalPadding to pull the nodes further apart, or set smaller LinkPadding to fit more links into that space.
I dont think It will solve my problem with changing HorizontalPadding and VerticalPadding Cz already I have given It as 10.
So please suggest some points,
Thanks