예제 #1
0
        public VAQUERY.QueryResultList <string> QueryFormulas(IList <IVisio.Shape> target_shapes, IList <ShapeSheet.SRC> srcs)
        {
            this.Client.Application.AssertApplicationAvailable();
            this.Client.Document.AssertDocumentAvailable();

            var shapes   = this.GetTargetShapes(target_shapes);
            var shapeids = shapes.Select(s => s.ID).ToList();

            var surface = this.Client.ShapeSheet.GetShapeSheetSurface();

            var query = new VAQUERY.CellQuery();

            int ci = 0;

            foreach (var src in srcs)
            {
                string colname = $"Col{ci}";
                query.AddCell(src, colname);
                ci++;
            }

            var formulas = query.GetFormulas(surface, shapeids);

            return(formulas);
        }
예제 #2
0
        public VAQUERY.QueryResultList <T> QueryResults <T>(IList <IVisio.Shape> target_shapes, IList <ShapeSheet.SRC> srcs)
        {
            this._client.Application.AssertApplicationAvailable();
            this._client.Document.AssertDocumentAvailable();

            var shapes   = this.GetTargetShapes(target_shapes);
            var surface  = this._client.ShapeSheet.GetShapeSheetSurface();
            var shapeids = shapes.Select(s => s.ID).ToList();

            var query = new VAQUERY.CellQuery();

            int ci = 0;

            foreach (var src in srcs)
            {
                string colname = String.Format("Col{0}", ci);
                query.AddCell(src, colname);
                ci++;
            }

            var results = query.GetResults <T>(surface, shapeids);

            return(results);
        }