Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Routing (Read 2082 times)
markiehill
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 11th, 2008
Routing
Aug 11th, 2008 at 10:16pm
Print Post  
Hello, I am evaluating your product for a project.

I am really enjoying using it, however I am having a real problem with routing especially when drawing out relationships within a database.

Without routing the tables are laid out side by side, as soon as define the relationships and switch on routing some of the tables are stacked on top of each other and the routes between the rest are poor (crossing boxes etc). I have fiddled around with the cost of turns etc.. But it does not seem to have much impact.

Any general tips around routing that I should be using.

Mark
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3201
Joined: Oct 19th, 2005
Re: Routing
Reply #1 - Aug 12th, 2008 at 6:29am
Print Post  
Hi,

Routing won't move tables, unless you are using the table.AttachTo(link) method. are you also using any of the layout classes?

g.
  
Back to top
 
IP Logged
 
markiehill
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 11th, 2008
Re: Routing
Reply #2 - Aug 12th, 2008 at 6:51am
Print Post  
i am using this to build the relationship

ObjNode.AddRelation(iSourceTableFieldPos,Relationship.OneToMany,ObjOtherNode,iDe
stTableFieldPos);


And then


diagram.RouteAllLinks();
RefreshDiagram(diagram);
diagram.ResizeToFitItems(10);
diagramView.ZoomToFit();

Mark

  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3201
Joined: Oct 19th, 2005
Re: Routing
Reply #3 - Aug 12th, 2008 at 7:03am
Print Post  
What does the RefreshDiagram(diagram) method do? if it adds new tables, or moves the existing tables around, you should call RouteAllLinks after RefreshDiagram. The RouteAllLinks method is a one-time operation, and doesnt keep the links routed all the time. See the AutoRoute property if you need that.

HTH
  
Back to top
 
IP Logged
 
markiehill
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 3
Joined: Aug 11th, 2008
Re: Routing
Reply #4 - Aug 12th, 2008 at 7:33am
Print Post  
it applies a layout ... possibly the wrong one ?

I think autoroute is set anyway because I set the
diagram.RouteLinks = true befire creating the relationships.

What i want to happen is for the nodes with most links to be central and then the other nodes to be positioned around the edges like a star.

private void RefreshDiagram(Diagram ObjDiagram)
{
TreeLayout tl = new TreeLayout();
tl.NodeDistance = 80;
tl.Arrange(ObjDiagram);
ObjDiagram.RouteAllLinks();
}
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3201
Joined: Oct 19th, 2005
Re: Routing
Reply #5 - Aug 12th, 2008 at 8:06am
Print Post  
TreeLayout works correctly only with trees. Use SpringLayout or LayeredLayout to lay out graphs that are more complex than trees.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint