Help with bad link routing

hi,

i have a bad link routing and i want to know how can i solve it
i want the link rout to be like the first group and not go over the other groups.
i defined the rout to avoid nodes but it doesn't work.
<DataTemplate x:Uid="DataTemplate_16" x:Key="{x:Static FlowCanvas:LinkCategories.FlowConditionEndSegmentLink}">
<go:LinkPanel x:Uid="go:LinkPanel_4" go:Part.Reshapable="False" go:Node.Movable="False" go:Node.Copyable="False"
go:Node.LayerName="Background">
<go:Link.Route>
<go:Route x:Uid="go:Route_4" Routing="AvoidsNodes" Curve="None" Corner="5"
FromSpot="BottomCenter" ToSpot="TopCenter"
RelinkableFrom="False" RelinkableTo="False" />
</go:Link.Route>
<go:LinkShape x:Uid="go:LinkShape_3" x:Name="arrowStroke" StrokeThickness="1.5" Stroke="{DynamicResource FlowLinkBrush}"/>
</go:LinkPanel>
</DataTemplate>
thanks,

What happens if the user shifts the “No” group a little bit? Does the link routing suddenly avoid the “Yes” group?

What nodes does that link connect? I assume it comes from the “No” group, but what does it go to? Is it a tiny transparent node that is also in the “Condition7” group? That will be required for the link’s routing to avoid nodes (including nested groups) within the “Condition7” group.

the user can’t shift the no group he can only add more nodes in the no group and the link stay the same if we add or remove a node from the no group.

the link connect the end of the no group to the end of the Condition7 group.
do i need to add a transparent node in "Condition7" group and change the to node of the link to the transparent node instead of the "Condition7" group ?

Yes, I think that would help. I believe what’s happening is that when routing that link, it tries to find a route that avoids all nodes in the group. But although it has special consideration for the two nodes that the link connects, one of the two nodes that it connects is the whole group itself, which makes it think it should try to avoid it too. But of course that’s impossible, so it gives up.

Or at least that’s my guess.

But even if that works, the results might still not be what you want. You’ll have to try it and see.

Hi Walter,

adding another node helped but i don't know how to set the node location.
can you help me?
thanks

You’ll need to customize the Group.Layout to make sure the bottom node is centered within the subgraph. You can do that by overriding LayoutNodes().

To get the node to be touching the group’s border, make sure the Padding and Margin are zero on the bottom.