Grouping and Ungrouping?

S

Scott Metzger

Hi,

If I 'drag' multiple shapes to a stencile they will create a 'grouped'
shape. I can then edit the Master Shape in the stencil and 'ungroup'
the shapes. However, when I place the shape from the stencil on a
diagram the shapes are now grouped.

Is their anyway I can take two or more connected shapes from a stencil
and drag them onto a drawing and _not_ have them be grouped?

BTW This is with Visio 2003.

Thank You,
Scott Metzger
 
S

Scott Metzger

The grouping when dropped on a stencil is by design, you should be able to
do an ungroup as the ondrop action.

You misunderstood me. I don't mind (so much) the grouping when I add
multiple shapes onto a stencil. I can get around that by editing the
shapes on the stencil and ungrouping them. However, even when they are
ungrouped in the stencil when I add this 'object' from the stencil to a
diagram the shapes are grouped. I am sure I can overcome this feature
via automation but I was hoping there was some setting in the Shapesheet
or Visio that would do this for me.

Thank You,
Scott Metzger
 
M

Mark Nelson [MS]

You want "Shape Assemblies". :)

The result of a drop into Visio will be a single shape. If you had multiple
shapes in the master, a group will be formed for you. It is possible to put
an ungroup command in the Shapesheet. You can put DOCMD(1052) in the
EventDrop cell. (The command number can be found via the VBA Object
Browser).

Unfortunately, Visio will pop up a message box asking if you really want to
sever the relationship between the shape and the master, which is something
you must do to ungroup the shapes. To eliminate this message, you need to
set AlertResponse through automation, which means that you are better off
doing the whole operation in automation.
 
J

John Marshall, MVP

I understood the problem, I just may have not explained it well enough.

1) The grouping is by design.
2) The shapesheet of the grouped shape on the stencil can be modified so
that when the shape is dropped, the shape is ungrouped.

To modify the shapesheet to do this.
1) open the shapesheet.
2) Scroll to the Events Section
3) Change the entry of the EventDrop Cell (First row, last column) from "No
Formula" to "=DOCMD(1052)"

1052 is the code for ungroup.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top