0 Members and 1 Guest are viewing this topic.
Sub move(Shp As Visio.Shape)Dim ShpToCut As Visio.SelectionDim temp3 As Visio.Shapea = 1x = Shp.Cells("pinx")y = Shp.Cells("piny")w = Shp.Cells("Width")h = Shp.Cells("height") ActiveWindow.DeselectAllSet ShpToCut = Shp.SpatialNeighbors(visSpatialOverlap + visSpatialTouching + visSpatialContain + visSpatialContainedIn, 0.1, visSpatialFrontToBack)If ShpToCut.Count > 0 Then Set temp = ActivePage.DrawOval(x - w / 2, y - h / 2, x + w / 2, y + w / 2) For i = 1 To ShpToCut.Count Debug.Print ShpToCut.Item(i).ID ActiveWindow.Select ShpToCut.Item(i), visSelect Next i ActiveWindow.Select temp, visSelect Application.ActiveWindow.Selection.Fragment Shp.BringToFrontEnd IfEnd Sub