0
Answer

Connecting a 2D shape to another 2D Shape in Visio using C#

Hi,

My question concerns gluing 2D shape directly to another 2D shape without the use of a connector.

To connect two shapes with a connector we first drop two stensils of 2D shapes and then we drop a Connector object and then we glue the connector with the shapes.

Cell beginXCell = connector.get_CellsSRC(visSectionObject, visRowXForm1D, vis1DBeginX)

beginXCell.GlueTo(shape1.get_CellsSRC(visSectionObject,visRowXFormOut,visXFormPinX));

Cell endXCell = connector.get_CellsSRC(visSectionObject,visRowXForm1D,vis1DEndX);

endXCell.GlueTo(shape2.get_CellsSRC(visSectionObject,visRowXFormOut,visXFormPinX));

My requirement is that I have two shapes, I need to drop these shapes and connect them in such a way that if I move shape which is holding other shape, both the shapes should move.

Can anyone please help me in finding a way to connect a 2D shape directly to another 2D shape (i.e. without a connector in between?)

 

Thanks,

Ram