sure, complete code is below and I attached a fcx file too. this code snippit has an xgap of 300 which causes the arrow from box 11 to 13 to be placed over the arrow from box 10 to 13 (like the screenshot I posted, my original screenshot had some custom drawing stuff which I removed.).
this->FlowChart1->UndoDepth = 0;
this->FlowChart1->AutoSizeDoc = true;
this->FlowChart1->AutoScroll = true;
this->FlowChart1->AllowMultiSel = false;
this->FlowChart1->ShowShadows = false;
this->FlowChart1->KbdActive = false;
this->FlowChart1->SelectAfterCreate = false;
this->FlowChart1->ArrowEndsMovable = false;
this->FlowChart1->ArrowSelStyle = Flowchartlib_tlb::ESelStyle::sstCustom;
this->FlowChart1->ArrowHead = Flowchartlib_tlb::EArrowHead::ahTriangle;
this->FlowChart1->ArrowStyle = Flowchartlib_tlb::EArrowStyle::asPerpendicular;
this->FlowChart1->PrpArrowStartOrnt = Flowchartlib_tlb::EPrpStartOrientation::soVertical;
this->FlowChart1->ArrowSegments = 2;
this->FlowChart1->ArrowCrossings = Flowchartlib_tlb::EArrowCrossings::acStraight;
this->FlowChart1->FireMouseMove = true;
this->FlowChart1->BoxCustomDraw = Flowchartlib_tlb::ECustomDraw::cdNone;
this->FlowChart1->BoxSelStyle = Flowchartlib_tlb::ESelStyle::sstCustom;
this->FlowChart1->BoxStyle = Flowchartlib_tlb::EBoxStyle::bsRect;
this->FlowChart1->Behavior = Flowchartlib_tlb::EBehavior::bhPanOnly;
this->AnchorPattern1->AddAnchorPointF(40, 100, false, true, Flowchartlib_tlb::EMarkStyle::msNone, 0x000000FF);
this->AnchorPattern1->AddAnchorPointF(50, 100, false, true,Flowchartlib_tlb::EMarkStyle::msNone, 0x0000FF00);
this->AnchorPattern1->AddAnchorPointF(60, 100, false, true,Flowchartlib_tlb::EMarkStyle::msNone, 0x0000FF00);
this->AnchorPattern1->AddAnchorPointF(40, 0, true, false,Flowchartlib_tlb::EMarkStyle::msNone, 0x0000FF00);
this->AnchorPattern1->AddAnchorPointF(50, 0, true, false,Flowchartlib_tlb::EMarkStyle::msNone, 0x0000FF00);
this->AnchorPattern1->AddAnchorPointF(60, 0, true, false,Flowchartlib_tlb::EMarkStyle::msNone, 0x0000FF00);
this->AnchorPattern1->PatternId = L"AP1";
this->FlowChart1->RoutingOptions->NodeVicinityCost = 10;
this->FlowChart1->RoutingOptions->NodeVicinitySize = 30;
this->FlowChart1->RoutingOptions->GridSize = 30;
this->FlowChart1->RoutingOptions->TurnCost = 10;
this->FlowChart1->RoutingOptions->LengthCost = 10;
this->FlowChart1->RoutingOptions->CrossingCost = 20;
this->FlowChart1->RoutingOptions->EndOrientation = Flowchartlib_tlb::EPrpStartOrientation::soVertical;//soVertical;
this->FlowChart1->RoutingOptions->StartOrientation = Flowchartlib_tlb::EPrpStartOrientation::soVertical;
this->FlowChart1->RoutingOptions->TriggerRerouting = Flowchartlib_tlb::ERerouteArrow::raWhenIntersectNode ;
this->FlowChart1->RoutingOptions->Anchoring = Flowchartlib_tlb::EAnchoring::ancReassign;
this->LayeredLayout1->Orientation = Flowchartlib_tlb::EOrientation::orVertical;
this->LayeredLayout1->EnforceLinkFlow = true;
this->LayeredLayout1->IgnoreNodeSize = false;
this->LayeredLayout1->ArrowAnchoring = Flowchartlib_tlb::EAnchoring::ancReassign;
this->LayeredLayout1->NodeDistance = 150;
this->LayeredLayout1->LayerDistance = 100;
this->LayeredLayout1->StraightenLongLinks = false;
this->LayeredLayout1->XGap = 300;
//this->LayeredLayout1->XGap = 90;
this->LayeredLayout1->MultipleGraphsPlacement = EMultipleGraphsPlacement::mgpHorizontal;
Flowchartlib_tlb::IBoxItem * b[16];
for (int i = 0; i < 16; i++) {
int width = 300;
int height = 100;
if (i == 0 || i == 4 || i == 8 || i == 7) {
width = 350;
height = 300;
}
b[i] = this->FlowChart1->CreateBox(0, 0, width, height);
b[i]->FillColor = clYellow;
b[i]->Obstacle = true;
b[i]->set_AnchorPattern( this->AnchorPattern1->GetDefaultInterface() );
UnicodeString caption;
caption.printf(L"%d", i);
b[i]->set_Text(caption.w_str());
}
this->FlowChart1->CreateArrow(b[0], b[1]);
this->FlowChart1->CreateArrow(b[0], b[2]);
this->FlowChart1->CreateArrow(b[1], b[2]);
this->FlowChart1->CreateArrow(b[2], b[3]);
this->FlowChart1->CreateArrow(b[2], b[4]);
this->FlowChart1->CreateArrow(b[3], b[4]);
this->FlowChart1->CreateArrow(b[4], b[5]);
this->FlowChart1->CreateArrow(b[4], b[6]);
this->FlowChart1->CreateArrow(b[5], b[6]);
this->FlowChart1->CreateArrow(b[5], b[7]);
this->FlowChart1->CreateArrow(b[6], b[8]);
this->FlowChart1->CreateArrow(b[7], b[8]);
this->FlowChart1->CreateArrow(b[8], b[9]);
this->FlowChart1->CreateArrow(b[8], b[10]);
this->FlowChart1->CreateArrow(b[9], b[10]);
this->FlowChart1->CreateArrow(b[10], b[11]);
this->FlowChart1->CreateArrow(b[10], b[13]);
this->FlowChart1->CreateArrow(b[11], b[12]);
this->FlowChart1->CreateArrow(b[11], b[13]);
this->FlowChart1->CreateArrow(b[12], b[13]);
this->FlowChart1->CreateArrow(b[13], b[14]);
this->FlowChart1->CreateArrow(b[13], b[15]);
this->FlowChart1->CreateArrow(b[14], b[15]);
this->FlowChart1->ArrangeDiagram( this->LayeredLayout1->GetDefaultInterface() );
this->FlowChart1->RouteAllArrows();
this->FlowChart1->FitDocToObjects( this->FlowChart1->ClientWidth/2 );
FlowChart1->SaveToFile( L"c:\\users\\test\\desktop\\xgap_bug.fcx", true );