Example #1
0
        public void Distribute(VA.Drawing.Axis axis, double d)
        {
            if (!this.Client.HasActiveDocument)
            {
                return;
            }
            var application = this.Client.VisioApplication;
            var selection   = this.Client.Selection.Get();
            var shapeids    = selection.GetIDs();

            using (var undoscope = new UndoScope(application, "Distribute"))
            {
                ArrangeHelper.DistributeWithSpacing(application.ActivePage, shapeids, axis, d);
            }
        }
        public void DistributeOnAxis(TargetShapes targets, Axis axis, double spacing)
        {
            if (!this._client.Document.HasActiveDocument)
            {
                return;
            }
            var page = this._client.Page.Get();

            targets = targets.ResolveShapes(this._client);
            var targetids = targets.ToShapeIDs();

            using (var undoscope = this._client.Application.NewUndoScope("Distribute on Axis"))
            {
                ArrangeHelper.DistributeWithSpacing(page, targetids, axis, spacing);
            }
        }