Visio Guy

Visio Discussions => Shapes & Templates => Topic started by: Jennifer on August 05, 2012, 07:29:00 PM

Title: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: Jennifer on August 05, 2012, 07:29:00 PM
I cannot find an option either in the Protection options (right-click > Format > Protection) or in the Group section of the shape sheet.

Is there any way to prevent ungrouping?
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: Paul Herber on August 05, 2012, 09:02:16 PM
You can lock the group but the lock can be unlocked.
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: Jennifer on August 05, 2012, 10:22:57 PM
Do you mean in the same way that I can "protect" a shape from being edited but I can remove the protection?

I want a lock that will prevent the ungroup command (CS+U) from unlocking the group. Like the error message I get when I try to delete a shape that has been protected against deletion.

If I really want to ungroup it, I'll first have to unlock the lock and then ungroup the group.

How to I apply that type of lock?
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: wapperdude on August 06, 2012, 12:43:15 AM
This goes back to the 1st (shapesheet) method I mentioned, unless I'm misunderstanding.  I've attached a sample that shows 4 independent shapes.  Then, all shapes were selected and grouped.  Finally, open the shapesheet of the resulting group shape (which is automatically selected upon grouping).  The LockGroup entry in the Protection section was changed from 0 to 1.  This ought to provide the protection you're looking for.

Wapperdude
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: Jennifer on August 06, 2012, 12:53:24 AM
Duh :-[ My apologies. You did explain that in the other thread. I have been messing with so many options, I misplaced that one. Thanks for the reminder. It seems to be working now.
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: wapperdude on August 06, 2012, 02:35:52 AM
 ;)

My pleasure.
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: Visisthebest on January 11, 2021, 07:54:32 PM
Superuseful this thank you Wapperdude!

Now another question, this is for shapes with CALLTHIS() subs in the Action menu.

I would like to prevent users from Grouping as well, because if they do this unintentionally they can no longer use the functionality as the new group does not have these functions. (and it will cause the users confusion)

Of course I can prevent users from begin able to select shapes, but that causes too many other issues and a terrible UX.

Is this possible at all?
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: wapperdude on January 11, 2021, 08:39:21 PM
Interesting...
If I understand, when a shape has Call This fcn in some action cell, then you don't want that shape to ever be in a group.  Yes?
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: Visisthebest on January 11, 2021, 09:23:43 PM
Hi Wapperdude yes exactly!
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: wapperdude on January 11, 2021, 09:34:19 PM
I'm not aware of any shapesheet functionality to do that.  Nor am I aware of a code accessible function.  But, with code, you could sort thru shapes to see if your criteria is met, then check if that shape is part of group, if so, subgroup it.  Maybe some of other members have alternative solutions.
Title: Re: Can I lock a group so that it cannot be ungrouped (CS+U)
Post by: wapperdude on January 11, 2021, 09:42:29 PM
Ah!  Your idea of checking PinX, PonY formulas should work fine.