protected override void ProcessRecord() { var cellmap = VisioScripting.Models.CellSrcDictionary.GetCellMapForPages(); if (this.Cells == null || this.Cells.Length < 1 || this.Cells.Contains("*")) { this.Cells = cellmap.GetNames().ToArray(); } Get_VisioPageCell.EnsureEnoughCellNames(this.Cells); var target_page = this.Page ?? this.Client.Page.Get(); this.WriteVerbose("Valid Names: " + string.Join(",", cellmap.GetNames())); var query = cellmap.ToQuery(this.Cells); var surface = new ShapeSheetSurface(target_page); var target_shapeids = new[] { surface.Target.Page.PageSheet.ID }; var dt = DataTableHelpers.QueryToDataTable(query, this.GetResults, this.ResultType, target_shapeids, surface); this.WriteObject(dt); }
protected override void ProcessRecord() { var cellmap = CellSrcDictionary.GetCellMapForShapes(); if (this.Cells == null || this.Cells.Length < 1 || this.Cells.Contains("*")) { this.Cells = cellmap.GetNames().ToArray(); } Get_VisioPageCell.EnsureEnoughCellNames(this.Cells); var target_shapes = this.Shapes ?? this.Client.Selection.GetShapes(); var v = string.Join(",", cellmap.GetNames()); this.WriteVerbose(string.Format("Valid Names: {0}", v)); var query = cellmap.ToQuery(this.Cells); var surface = this.Client.ShapeSheet.GetShapeSheetSurface(); var target_shapeids = target_shapes.Select(s => s.ID).ToList(); var dt = DataTableHelpers.QueryToDataTable(query, this.GetResults, this.ResultType, target_shapeids, surface); this.WriteObject(dt); }