Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Route arrow when origin/destination box are the same? (Read 3729 times)
BF
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Feb 26th, 2013
Route arrow when origin/destination box are the same?
May 31st, 2013 at 4:12pm
Print Post  
Hi, I am using FlowChartX Pro and trying to get an arrow to go from the bottom of a box into the top of the same box (Think of the box as a control flow procedure which calls itself)

I am using both the Layered and Tree layout to test this. If the layout doesnt like arrows pointing backwards (ie, from bottom to top, I can create the arrow so it goes top to bottom and just custom draw the arrow head to look as expected)

Currently the arrow goes straight through the box and does not get routed around as expected.

My code for setting up the chart and layout is here: http://pastebin.com/3STJpgbz

The box is set as an obstacle so I can think how to fix this?


  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Route arrow when origin/destination box are the same?
Reply #1 - May 31st, 2013 at 5:28pm
Print Post  
Hi,

The layout classes ignore reflexive arrows at this time. You could set the points yourself with some post-processing code:

Code
Select All
Dim a As arrow
For Each a In fcx.Arrows
    If a.Origin Is a.Destination Then a.IgnoreLayout = True
Next a

Dim ll As New LayeredLayout
...
fcx.ArrangeDiagram ll

For Each a In fcx.Arrows
    If a.Origin Is a.Destination Then
        a.Segments = 5
        a.Style = asPolyline
        a.CtrlPtX(0) = a.OriginBox.left + 20
        a.CtrlPtY(0) = a.OriginBox.bottom
        a.CtrlPtX(1) = a.OriginBox.left + 20
        a.CtrlPtY(1) = a.OriginBox.bottom + 20
        a.CtrlPtX(2) = a.OriginBox.left - 20
        a.CtrlPtY(2) = a.OriginBox.bottom + 20
        a.CtrlPtX(3) = a.OriginBox.left - 20
        a.CtrlPtY(3) = a.OriginBox.top - 20
        a.CtrlPtX(4) = a.OriginBox.left + 20
        a.CtrlPtY(4) = a.OriginBox.top - 20
        a.CtrlPtX(5) = a.OriginBox.left + 20
        a.CtrlPtY(5) = a.OriginBox.top
        a.Update
    End If
Next a 



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


I Love MindFusion!

Posts: 9
Joined: Feb 26th, 2013
Re: Route arrow when origin/destination box are the same?
Reply #2 - Jun 4th, 2013 at 1:03pm
Print Post  
Great, thanks, I have been able to get something working based on that.

In a future version it would be nice it this happened automatically and it honored reassigning anchor points to minimize crossings.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint