public VAQUERY.QueryResultList <T> QueryResults <T>(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 results = query.GetResults <T>(surface, shapeids); return(results); }
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 = $"Col{ci}"; query.AddCell(src, colname); ci++; } var results = query.GetResults <T>(surface, shapeids); return(results); }