Ejemplo n.º 1
0
        protected override void ProcessRecord()
        {
            var cellmap = 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.CreateQueryFromCellNames(this.Cells);
            var surface         = new VA.ShapeSheet.ShapeSheetSurface(target_page);
            var target_shapeids = new[] { surface.Target.Page.PageSheet.ID };
            var dt = Helpers.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($"Valid Names: {v}");
            var query           = cellmap.CreateQueryFromCellNames(this.Cells);
            var surface         = this.client.ShapeSheet.GetShapeSheetSurface();
            var target_shapeids = target_shapes.Select(s => s.ID).ToList();
            var dt = Helpers.QueryToDataTable(query, this.GetResults, this.ResultType, target_shapeids, surface);

            this.WriteObject(dt);
        }