/// <summary>
        /// Returns all the connected pairs of shapes in the active page
        /// </summary>
        /// <param name="flag"></param>
        /// <returns></returns>
        public IList<VACONNECT.ConnectorEdge> GetTransitiveClosure(VACONNECT.ConnectorEdgeHandling flag)
        {
            this.Client.Application.AssertApplicationAvailable();
            this.Client.Document.AssertDocumentAvailable();

            var app = this.Client.Application.Get();
            return VACONNECT.PathAnalysis.GetTransitiveClosure(app.ActivePage, flag);
        }
 internal ConnectionPointValues(int shapeid, VACONNECT.ConnectionPointCells point)
 {
     this.ShapeID = shapeid;
     this.Type = point.Type.Formula.Value;
     this.X = point.X.Formula.Value;
     this.Y = point.Y.Formula.Value;
     this.DirX = point.DirX.Formula.Value;
     this.DirY = point.DirY.Formula.Value;
 }
        public IList<VACONNECT.ConnectorEdge> GetDirectedEdges(VACONNECT.ConnectorEdgeHandling flag)
        {
            this.Client.Application.AssertApplicationAvailable();
            this.Client.Document.AssertDocumentAvailable();

            var application = this.Client.Application.Get();
            var directed_edges = VACONNECT.PathAnalysis.GetDirectedEdges(application.ActivePage, flag);
            return directed_edges;
        }
        public IList<int> Add(
            string fx,
            string fy,
            CONS.ConnectionPointType type)
        {
            this.AssertApplicationAvailable();

            return this.Add(null, fx, fy, type);
        }
        public IList<int> Add( IList<IVisio.Shape> target_shapes, 
            string fx,
            string fy,
            CONS.ConnectionPointType type)
        {
            this.Client.Application.AssertApplicationAvailable();
            this.Client.Document.AssertDocumentAvailable();

            var shapes = this.GetTargetShapes(target_shapes);
            if (shapes.Count < 1)
            {
                return new List<int>(0);
            }

            int dirx = 0;
            int diry = 0;

            var indices = new List<int>(shapes.Count);

            var app = this.Client.Application.Get();
            using (var undoscope = this.Client.Application.NewUndoScope("Add Connection Point"))
            {
                var cp = new CONS.ConnectionPointCells();
                cp.X = fx;
                cp.Y = fy;
                cp.DirX = dirx;
                cp.DirY = diry;
                cp.Type = (int)type;

                foreach (var shape in shapes)
                {
                    int index = CONS.ConnectionPointHelper.Add(shape, cp);
                    indices.Add(index);
                }
            }

            return indices;
        }