Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Diagram.RouteAllLinks routes outside drawing (Read 3290 times)
oOAnriOo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Oct 12th, 2009
Diagram.RouteAllLinks routes outside drawing
Jan 6th, 2010 at 10:45am
Print Post  
Hello good sir, and happy Newyear.

Im allmost done with this part of the project but I still have a few questions though;

On this screen i route all the links using Diagram.RouteAllLinks.
Problem is that some of the links are routed outside the drawing area, even though there is enough space to fit them..

Is there any way to resolve them?


2.nd question.. Is there some setting that allows the user to move links, but not the diagramnodes?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.RouteAllLinks routes outside drawing
Reply #1 - Jan 6th, 2010 at 1:39pm
Print Post  
Hi Anri,

I think the links should stay inside diagram.Bounds, but in this case the routing function might have selected a path exactly along the boundary. You might temporarily set a slightly smaller Bounds, and restore it after calling RouteAllLinks. Another option is to add a temporary obstacle node at the bottom. I guess we can add some property to let you define a buffer area along the diagram boundaries where links will be prohibited.

You could set EnabledHandles = None for all nodes to prevent users from moving them, or set their Locked property. The latter would prevent selection too.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
oOAnriOo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Oct 12th, 2009
Re: Diagram.RouteAllLinks routes outside drawing
Reply #2 - Jan 6th, 2010 at 1:49pm
Print Post  
Thank you.. 

I'll get on it right away.

Is there a property preventsselection of multiple elements/drawingnodes both when you ctrl-click them and drags a box around them.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.RouteAllLinks routes outside drawing
Reply #3 - Jan 6th, 2010 at 2:03pm
Print Post  
Set diagram.Selection.AllowMultipleSelection = false.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
oOAnriOo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Oct 12th, 2009
Re: Diagram.RouteAllLinks routes outside drawing
Reply #4 - Jan 6th, 2010 at 2:50pm
Print Post  
Well unfortunately the lanes does seem to be drawn outside the bounds in my case.

I used your suggestion with the obstacle node and allthough its not the prettiest solution, it works like a charm and the customer won't notice anything.

The diagram.Selection.AllowMultipleSelection worked offcourse, but i'd expected to find that property on the diagram or the diagramView..  Not a big problem though Smiley

  
Back to top
 
IP Logged
 
oOAnriOo
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 19
Joined: Oct 12th, 2009
Re: Diagram.RouteAllLinks routes outside drawing
Reply #5 - Jan 6th, 2010 at 2:51pm
Print Post  
And THANK you for your allways PERFECT support.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Diagram.RouteAllLinks routes outside drawing
Reply #6 - Jan 6th, 2010 at 3:28pm
Print Post  
8) That's strange, from what I can see in the code the default router uses the union of diagram.GetContentBounds() and diagram.Bounds as link layout area. Are you perhaps calling ResizeToFitItems or changing Bounds at some point after RouteAll? Or there might be some items enlarging the layout area at the time when RouteAll is called, which are later removed or resized to a smaller size?
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint