S
shailendrasingh823
Hi All,
I want to group the connected shapes with each other,but when i drop
the shapes on page ,connect them & then use selction select all the
shape & group them the connection between shape is disconnected.
code is like that
// create a triangle shape from the stencil master collection
Visio.Shape shape1 =
currentPage.Drop(currentStencil.Masters["Triangle"], 1.50, 1.50);
// create a square shape from the stencil master
collection
Visio.Shape shape2 =
currentPage.Drop(currentStencil.Masters["Triangle"], 3, 4);
// create a dynamic connector from the stencil master
collection
Visio.Shape connector =
currentPage.Drop(currentStencil.Masters["Dynamic connector"], 4.50,
4.50);
// connect the shapes together through the dynamic
connector
ConnectShapes(shape1, shape2, connector);
window.SelectAll();
Visio.Selection selection1 = window.Selection;
selection1.DeselectAll();
selection1.Select(shape1,
(short)Microsoft.Office.Interop.Visio.
VisSelectArgs.visSelect);
selection1.Select(shape2,
(short)Microsoft.Office.Interop.Visio.
VisSelectArgs.visSelect);
selection1.Select(connector,
(short)Microsoft.Office.Interop.Visio.
VisSelectArgs.visSelect);
Visio.Shape group1 = selection1.Group();
please give me some idea .
shail
I want to group the connected shapes with each other,but when i drop
the shapes on page ,connect them & then use selction select all the
shape & group them the connection between shape is disconnected.
code is like that
// create a triangle shape from the stencil master collection
Visio.Shape shape1 =
currentPage.Drop(currentStencil.Masters["Triangle"], 1.50, 1.50);
// create a square shape from the stencil master
collection
Visio.Shape shape2 =
currentPage.Drop(currentStencil.Masters["Triangle"], 3, 4);
// create a dynamic connector from the stencil master
collection
Visio.Shape connector =
currentPage.Drop(currentStencil.Masters["Dynamic connector"], 4.50,
4.50);
// connect the shapes together through the dynamic
connector
ConnectShapes(shape1, shape2, connector);
window.SelectAll();
Visio.Selection selection1 = window.Selection;
selection1.DeselectAll();
selection1.Select(shape1,
(short)Microsoft.Office.Interop.Visio.
VisSelectArgs.visSelect);
selection1.Select(shape2,
(short)Microsoft.Office.Interop.Visio.
VisSelectArgs.visSelect);
selection1.Select(connector,
(short)Microsoft.Office.Interop.Visio.
VisSelectArgs.visSelect);
Visio.Shape group1 = selection1.Group();
please give me some idea .
shail