Transform simple shape into group

Started by Yacine, May 25, 2010, 06:22:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Yacine

Does it also happen to you that you start developing a shape and realize after a while that you should have better worked on a group, because you need to include additional shapes, texts and so on? How often have I done the work twice. I almost get the reflex to start with making a group, regardless what it is going to become.
I'd wish to have a function to transform a simple shape with all it's custom data, user and geometry sections,... into a group.
I know that you can recognise if a shape is a group by VBA, but can you set it as well?
Yacine

Visio Guy

It's there, because we know your frustration and requested this from the Visio engineers in Visio 3.0.

Shape > Operations > Convert to Group (or maybe Shape > Grouping > Convert to Group - I've got Visio 2010 now, and it's hard to check).

Be careful, though. Any geometry you created in the original shape will stay in the group's ShapeSheet. By default this will be on top of sub-shapes inside the group. There's no way to "demote" group-level geometry to sub-shape geometry, but there is a switch in Format > Behavior that lets you show group geometry behind group-member geometry.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Yacine

Thank you so much. There is still stuff to discover in the standard menues. Guess I need now to move the post to general visio or delete it.
Yacine

Yacine

#3
Thank you for moving my post.

The matter of the geometry staying in the group shape is not a problem.
Prior to transforming into group you can either make a union or a join of a *COPY* of the original shape in order to reset it and include this copy in the group. You would then delete the geometry section of the group.
In case of multiple geometries you would of course not do any of the fast resettings, but  delete the undesired sections by hand in order to keep every think neat.
Cheers
Yacine

effebruno

Hi, I'm a Visio (2010) newbie and I don't understand the difference between using "Group" and "Convert to Group" commands. Could I use the 1st command to transform the shape into a group? The infotip on the 2nd command says something about metafile images pasted or imported, but it works also on single shapes (though it warns me about the destruction of the link with the object's master) and it's your answer.

i have tried to figure out the differences and I did some trials, leading me to a greater confusion. In particular:

1) I select shape A and then I choose Group
2) I select the group (even if it only contains shape A) and shape B and I choose Add to Group
3) RESULT: the alignment box expands to contain the 2 shapes.

now from scratch:

4) I select shape A and then I choose Convert to Group
5) I select the group (even if it only contains shape A) and shape B and I choose Add to Group
6) RESULT: the alignment box remains that of shape A. If I try to update it (Developer | Operations | Update alignment box) I get an error about shape protection, containers or layers denying the command.

more:

7) I select the group, then I click on shape B to select this sub-shape, then I choose Remove from Group
8) RESULT: shape A disappears and remains shape B (ungrouped)!

Could you help me understand what's happening?
Thank you a lot,

Filippo

wapperdude

The group command is basically applied to multiple individual shapes and forms them into a group.  Visio does this by creating a new, "high level" shape.  This is the group, and contains all of the individual shapes that had been selected.  So, if 3 shapes had been grouped, there are now actually 4 shapes, the 3 plus the high-level group.  The default setting for grouping allows the first click to select the group and the second click to select a sub-member of the group.  If you just select the group, and then ungroup, every sub-member is returned to a separate individual, and the top-level group shape is eliminated.  If you select a sub-member and then chose remove from group, that sub-member becomes and individual but the remaining shapes still stay grouped. 

The add to group command allows you to add other selected shapes to an existing group.  Usually you select the desired group first, then the shapes to be added, and then the add to group command.

The convert to group command changes the selected shape into a group.  As such you can add other shapes to it with the add to group command.  In the above case of 3 shapes, had one of them been converted, and then the other two added to the group, the result would have been still 3 total shapes.  The top level group (converted shape) plus the 2 sub-members.  Now, if you choose ungroup, you still retain 3 shapes!  ???  The 2 sub-members, plus the converted shape is de-converted.   :o  Or, you could select one of the sub-members and remove from group.  It becomes a separate individual, but the other two remain grouped.

In the special case, where you had converted a shape to a group, then added a shape to it, and then, instead of ungrouping, you chose to remove from group, the converted shape is lost.  In this case, Visio just throws away the group, and does not un-convert the shape.

So, it is the convert to group command that transforms a shape into a group.  It the group command that gathers all selected shapes into a group. 

HTH
Wapperdude

Visio 2019 Pro

effebruno

Thank you for the rapid reply, even on sunday!   :)

So, converting a shape into a group simply avoids the creation of the "high level" shape? But what are the advantages of doing so? Why a shape converted into a group could be more desiderable than a simply grouped shape (resulting in the 2 shapes: the original and the "high level" one)?

Finally, why can't I update the alignment box of a converted shape to which I have added some other shapes (I get the error on protection etc)?

Regards,

Filippo