public void Copy(IVisio.Shape target_shape, VisioScripting.Models.FormatPaintCategory paint_category) { this._client.Application.AssertApplicationAvailable(); this._client.Document.AssertDocumentAvailable(); var targets = new VisioScripting.Models.TargetShapes(target_shape); var shapes = targets.ResolveShapes(this._client); if (shapes.Shapes.Count < 1) { return; } var shape = shapes.Shapes[0]; this.cache.CopyFormat(shape, paint_category); }
public void Paste(VisioScripting.Models.TargetShapes targets, VisioScripting.Models.FormatPaintCategory paint_category, bool apply_formulas) { this._client.Application.AssertApplicationAvailable(); this._client.Document.AssertDocumentAvailable(); targets = targets.ResolveShapes(this._client); if (targets.Shapes.Count < 1) { return; } var shapeids = targets.Shapes.Select(s => s.ID).ToList(); var application = this._client.Application.Get(); var active_page = application.ActivePage; this.cache.PasteFormat(active_page, shapeids, paint_category, apply_formulas); }