S
shailendrasingh823
Hi There,
I am trying to use Logical Connector rather than Dynamic Connector,
I have written function
private static void glueConnectionToItems(
Visio.Page drawingPage,
Visio.Shape connectionShape,
int fromShapeIndex,
int toShapeIndex)
{
try
{
// Glue the beginning of the connection to the "From"
shape.
Visio.Cell shapeCell =
drawingPage.Shapes[fromShapeIndex].get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXFormOut,
(short)Visio.VisCellIndices.visXFormPinX);
Visio.Cell connectorCell =
connectionShape.get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXForm1D,
(short)Visio.VisCellIndices.vis1DBeginX);
connectorCell.GlueTo(shapeCell);
// Glue the end of the connection to the "To" shape.
shapeCell =
drawingPage.Shapes[toShapeIndex].get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXFormOut,
(short)Visio.VisCellIndices.visXFormPinX);
connectorCell =
connectionShape.get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXForm1D,
(short)Visio.VisCellIndices.vis1DEndX);
connectorCell.GlueTo(shapeCell);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
it's working fine for Dynami Connection but for logical connection
when I am passing Shape & try to grt its cells
giving me "Inappropriate source object for this action" when
calling
Visio.Cell connectorCell = connectionShape.get_CellsSRC(..).
Thanks
Shail
I am trying to use Logical Connector rather than Dynamic Connector,
I have written function
private static void glueConnectionToItems(
Visio.Page drawingPage,
Visio.Shape connectionShape,
int fromShapeIndex,
int toShapeIndex)
{
try
{
// Glue the beginning of the connection to the "From"
shape.
Visio.Cell shapeCell =
drawingPage.Shapes[fromShapeIndex].get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXFormOut,
(short)Visio.VisCellIndices.visXFormPinX);
Visio.Cell connectorCell =
connectionShape.get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXForm1D,
(short)Visio.VisCellIndices.vis1DBeginX);
connectorCell.GlueTo(shapeCell);
// Glue the end of the connection to the "To" shape.
shapeCell =
drawingPage.Shapes[toShapeIndex].get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXFormOut,
(short)Visio.VisCellIndices.visXFormPinX);
connectorCell =
connectionShape.get_CellsSRC(
(short)Visio.VisSectionIndices.visSectionObject,
(short)Visio.VisRowIndices.visRowXForm1D,
(short)Visio.VisCellIndices.vis1DEndX);
connectorCell.GlueTo(shapeCell);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
it's working fine for Dynami Connection but for logical connection
when I am passing Shape & try to grt its cells
giving me "Inappropriate source object for this action" when
calling
Visio.Cell connectorCell = connectionShape.get_CellsSRC(..).
Thanks
Shail