Visio Guy

Visio Discussions => Programming & Code => Topic started by: smelvadj on March 05, 2019, 04:44:25 PM

Title: Using m_page_ShapeAdded in ThisDocument - Find if the current shape has connects
Post by: smelvadj on March 05, 2019, 04:44:25 PM
Hi,

I have some shapes which may be connected by connection points. Each shape has an in going and outgoing connection point.
If the user copies a bunch of connected shapes to duplicate, i need to find the shape which has nothing connected to the outgoing connection point ("The dictator"). I have attached my code so far. I use the "m_page_ShapeAdded in ThisDocument". The text in the red box should be run i the current shape does not have a shape connected to the outgoing connection point.

Is there a method to find out, if a shape is not connected.?

In the For loop, i find all the shapes that IS connected to another shape at the outgoing connection point.

I look forward to hear from you :)
Title: Re: Using m_page_ShapeAdded in ThisDocument - Find if the current shape has connects
Post by: OldSchool1948 on April 08, 2019, 05:42:12 PM
Use GluedShapes to determine the Shape IDs for the incoming or outgoing shapes connected to a connector.


arySceIDs = vsoConnector.GluedShapes(visGluedShapesIncoming2D, "")
aryDstIDs = vsoConnector.GluedShapes(visGluedShapesOutgoing2D, "")