Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Progress Indicator on ArrangeDiagram + routing (Read 1398 times)
unisnk
Junior Member
**
Offline


D'Oh!

Posts: 59
Joined: Sep 3rd, 2008
Progress Indicator on ArrangeDiagram + routing
Sep 4th, 2008 at 9:10am
Print Post  
hi,

I'm still testing the component and I've two questions for you.

1) Since I'm going to manage a large amount of boxes (>100), I want to know if there is a way to obtain a "Progress Indicator" (maybe via Windows' messages?) while the ArrangeDiagram method is executing. This can be useful for the users because the algorithm takes up to 30 seconds to execute. I use ArrangeDiagram on GridLayout and SpringLayout.

2) Sometimes arrows are not routed very well: as you can see in this image, arrow is crossing the box and we have to avoid this. (this happens both to GridLayout and SpringLayout). I was wrong on something?



for SpringLayout I use this:
Code
Select All
var lt: SpringLayout;
begin
  lt := CoSpringLayout.Create();
  lt.EnableClusters := true;
  lt.NodeDistance  := 50;
  lt.NumIterations := 500;
  lt.ArrowAnchoring := ancReassign;
  flowchart1.ArrangeDiagram(lt);
end; 



this for GridLayout:
Code
Select All
var lt: GridLayout;
begin
  lt := CoGridLayout.Create();
  lt.GridSize := 85;
  lt.RandomSeed := 1;
  lt.NumIterations := 500;
  lt.ArrowAnchoring := ancReassign;
  flowchart1.ArrangeDiagram(lt);
end; 



for completeness I also post assigned properties of flowchart1 object

Code
Select All
  FlowChart1.RouteArrows := True;

  FlowChart1.ArrowStyle := asPerpendicular;

  FlowChart1.RoutingOptions.Anchoring := ancReAssign;
  FlowChart1.RoutingOptions.NodeVicinityCost := 100;
  FlowChart1.RoutingOptions.CrossingCost := 100;
  FlowChart1.RoutingOptions.NodeVicinitySize := 20;
  FlowChart1.RoutingOptions.TurnCost:= 1;
  flowchart1.RoutingOptions.TriggerRerouting := raWhenIntersectNode;
 



any suggestions? Thanks in advance. Best Regards
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Progress Indicator on ArrangeDiagram + routing
Reply #1 - Sep 4th, 2008 at 3:22pm
Print Post  
Hi,

1) We'll have to add some new event to let you do this.

2. SpringLayout does not route links at all, and I suppose you could get that effect if using anchor points and the cascading link style. Try calling the RouteAllArrows method after applying the layout.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint