Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Flow Layout error! (Read 3437 times)
kehagiem
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Jul 6th, 2008
Flow Layout error!
Jul 6th, 2008 at 8:59am
Print Post  
Hello,

I 've tried to use the snippet code below to formate a tree with around 30 nodes but the following error appears:

Error desc:
index out of range in "flowLayout.Arrange(m_flowChart);"

Can you please help?
I use the 5.0.3 version.

Regards,
Emmanouel


/* code snipet start */
m_flowChart.RoutingOptions.CrossingCost = 100;
     m_flowChart.RoutingOptions.Anchoring = Anchoring.Ignore;

     FlowLayout flowLayout = new FlowLayout();
     flowLayout.AutoRoute = true;
     flowLayout.HorizontalGroupOffset = 60;
     flowLayout.VerticalGroupOffset = 35;
     flowLayout.NodeDistance = 10;
     flowLayout.Margins = new SizeF(0, 0);

     // define direction rules for the connector types
     MindFusion.Layout.FlowLayoutRules rules = flowLayout.LayoutRules;
     rules.PreferredRules = MindFusion.Layout.PreferredRules.ConnectorRules;
     rules.ConnectorRules.DownOriented = new string[] { "ControlFlow", "True" };
     rules.ConnectorRules.RightOriented = "False";

     // miscellaneous rules
     rules.NodeRules.GroupStartNodes = "Start";
     rules.ConnectorRules.HorizontalBendOrientation = false;

     // arrange the flowchart and fit it into view
     flowLayout.Arrange(m_flowChart);
/* code snipet end */
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Flow Layout error!
Reply #1 - Jul 7th, 2008 at 6:43am
Print Post  
Hi Emmanouel,

Have you set the LayoutTraits[LogicID] for each link to one listed in the ConnectorRules lists? Could you save the diagram and email to support@mindfusion.eu?

Thanks,
Stoyan
  
Back to top
 
IP Logged
 
kehagiem
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Jul 6th, 2008
Re: Flow Layout error!
Reply #2 - Jul 9th, 2008 at 5:55pm
Print Post  
Hi,

This error cames up when I have the option to catch exceptions thrown by the common language runtime (ctrl-alt-e in visual studio).

If I dont have this option enabled it seems to work ok. Of course in the output window of the visual studio i get the exceptions messages.

The LayoutTraits property for each link is empty and readonly.

How can I send you the flow? I have custom nodes. (hosted).


Regards,
Emmanouel
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Flow Layout error!
Reply #3 - Jul 10th, 2008 at 7:27am
Print Post  
Hi,

Use Diagram.SaveToXml and email us the XML file.

Thanks,
Stoyan
  
Back to top
 
IP Logged
 
kehagiem
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Jul 6th, 2008
Re: Flow Layout error!
Reply #4 - Jul 12th, 2008 at 1:22pm
Print Post  
Hi,

I have emailed you the xml file.

Thanks,
Emmanuel
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint