AskOnDrop for Grouped Master Shapes

Z

ZebZiggle

I have created a master shape that has a central shape and a few
connectors hanging off it. On the central shape, I've defined some
custom properties and set AskOnDrop to True.

Without the connectors, AskOnDrop behaves correctly, the custom
properties dialog appears.

With the connectors, the shape seems to be added to the page as a
group (although I didn't group the master shapes). And, for some
reason, the AskOnDrop is ignored.

I can work around this rather clumsily by:
+ grouping the objects in the master shape
+ adding the custom properties to the group
+ setting askOnDrop on the group

But this is gross.

Anyone have any ideas why visio behaves this way (other than the
obvious)?

Thx
-Z
 
G

GMorris

I had a similar issue. I've been developing a nice application that does
some
really cool things, one is making new masters using a group of other shapes
to get properties and settings. On creating the new shape, everything goes
well until I need to add more shapes to the master. When I ran into this, I
figured that Visio automatically groups the shapes when the master is
dropped
if there is more than one shape and they haven't already been grouped,
which meant that any connection points I had added would no longer be
available without ungrouping the master (not a good option). So, instead I
just waited until the master was made (shape wise), and then added the
connection points to the topmost shape. Since all of this was being done
through VBA, it seemed kind of cheap to have a dialog pop up in what is
supposed to be an automated process asking if you want to save the changes.
I searched high and low to find a way to programatically group the shapes
in the master while the program was creating it, but exhausted everything.
The
way I ended up doing it was to program the master creation, then create
a second master with the program and drop the original on it so that it will
group without asking any questions. Then I just programatically delete the
original, set up a reference to the second one and add the connections, etc.
as needed. I, for one, would also like to know why this happens and if there
is a better way around it. It is annoying and my program does work, it just
looks funny if you start adding the new masters to a new stencil and there's
a gap every other icon!
 

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