I need to draw a
Visio file diagram by extracting values from an excel file. I have the following columns in Excel file :
• StepNo (Unique identifier for each Process)
• Source System (Text to be written in the Process)
• Destination System (Unique identifier for Process to which connection is to be made)
• Interaction info ( Text to be written on the connector)
Using the following code, I’m able to connect Source and Destination Process (Visio shapes) :
private static void ConnectShapes(Shape shape1, Shape shape2, Shape connector)
{
Cell beginXCell = connector.get_CellsSRC(
(short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXForm1D, (short)VisCellIndices.vis1DBeginX);
beginXCell.GlueTo(shape1.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXFormOut,
(short)VisCellIndices.visXFormPinX));
Cell endXCell = connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXForm1D,
(short)VisCellIndices.vis1DEndX);
endXCell.GlueTo(shape2.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowXFormOut,
(short)VisCellIndices.visXFormPinX));
Cell arrowCell = connector.get_CellsSRC((short)VisSectionIndices.visSectionObject, (short)VisRowIndices.visRowLine, (short)VisCellIndices.visLineEndArrow);
arrowCell.FormulaU = "5";
}
My Problem is I’m not able to determine the position of connection points in Source and Destination Systems. When the excel file values become complex, too many connections are to be made. So, the connectors are overlapped over one another. Is there any method by which I can determine the connection points and thus avoid the overlapping?