protected override void ProcessRecord()
        {
            var targetshapes = new VisioScripting.TargetShapes(this.Shapes);
            var udcell       = new VisioScripting.Models.UserDefinedCell(this.Name, this.Value);

            if (this.Prompt != null)
            {
                udcell.Cells.Prompt = this.Prompt;
            }

            this.Client.UserDefinedCell.SetUserDefinedCell(targetshapes, udcell);
        }
        public void Set(VisioScripting.Models.TargetShapes targets, VisioScripting.Models.UserDefinedCell cell)
        {
            this._client.Application.AssertApplicationAvailable();
            this._client.Document.AssertDocumentAvailable();

            targets = targets.ResolveShapes(this._client);

            if (targets.Shapes.Count < 1)
            {
                return;
            }

            using (var undoscope = this._client.Application.NewUndoScope("Set User-Defined Cell"))
            {
                foreach (var shape in targets.Shapes)
                {
                    UserDefinedCellHelper.Set(shape, cell.Name, cell.Cells);
                }
            }
        }