Beispiel #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);
        }
Beispiel #2
0
        public VAQUERY.QueryResultList <string> QueryFormulas(IList <IVisio.Shape> target_shapes, IVisio.VisSectionIndices section, IList <IVisio.VisCellIndices> cells)
        {
            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();
            var sec   = query.AddSection(section);

            int ci = 0;

            foreach (var cell in cells)
            {
                string name = $"Cell{ci}";
                sec.AddCell((short)cell, name);
                ci++;
            }

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

            return(formulas);
        }