//if we have editing permission for all own shapes, we can clear them all public void RemoveOwnShapes(int owner) { var ownShapes = _doc.GetShapes().Where(sh => sh.InitialOwner() == owner && sh.ShapeCode() != VdShapeType.Badge); foreach (var s in ownShapes) { if (!editingPermission(s)) { MessageBox.Show("To delete your shapes, wait until all your shapes are free of user cursors", "No permission", MessageBoxButton.OK, MessageBoxImage.Error); return; } } _doc.BeginClearShapesOfOwner(); }