Control shapes to prevent overlapping?

Started by Michelle, November 12, 2008, 07:42:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Michelle

I have a shape in Visio that has several sub-shapes within it.  The placement and visibility of these sub shapes is determined by the user filling in questions on the shape data box.  The shape is basically a room with several elements and where they will be placed on the ceiling or walls of the room.  Is there any way to keep the sub shapes from overlapping each other?  These sub shapes are not dragged and dropped into the drawing, they are already there. Whether they are visible or not, and their location is controlled by the shape data chosen. 

I have successfully used the BOUND function to keep the shapes within the size of the room (which is also controlled by shape data choice), but to use the bound command to  control 6 different shapes and the many possibilities of locations seems a little cumbersome. 

Any help is much appreciated!

wapperdude

Open the shapesheet for each of your sub-shapes, in the miscellaneous section, ObjType cell, set the entry value to 1.   8)
To control the amount of separation go to File > Page Setup > Layout and Routing > Spacing ... button.  You can set the horizontal and vertical spacing as desired.   :o

Note, in the previous menu (Layout and Routing) there is a check box for moving shapes away on drop -- this won't help already placed shapes.   :P
Visio 2019 Pro

Michelle

That didn't seem to do it.  Does the ObjType cell affect only those shapes that are brought into the drawing- or should it work for shapes already placed that are just moving around in location? 

Could I maybe do a work around by having a warning box pop up if the sub-shapes wind up in the same area on the drawing?  If so, how would I do this?   ::)

Or could the choices available in the shape data pull downs be constrained to not show dimensions that are not applicable?  Like if they can choose the size of the room up to 20 feet (in two inch incrememnts) and they choose 10 feet... can the shape data pulldown for the sub shapes only show the options up to 10 feet, rather than the 20 feet that is on the list now?  If I can control the list the user sees and choses from, I also could use that method to take dimensions out of the list that correspond to the subshapes already placed... 

Am I making sense or has it been a loooong day  ???

Michelle

wapperdude

#3
The ObjType should work for already placed shapes.  That's the cell entry that would have been changed if the shape were newly dropped on the page.  It's important that you change each of the sub-shapes, the group doesn't matter.

Ah!  Turns out you do have to select the Move Other Shapes Away on Drop check box on the Page Setup > Layout and Routing menu.  I unclicked the selection, and then the shape became "friendly".   :-[
Visio 2019 Pro

Michelle

GRRRRR!  I can't get it to work right.  I have the shapes changed, but when I go into the shape data in the main shape (which controlsthe main shape and all the subshapes) and choose the same dimension locations for two of them, they pop right over top of each other. 

I don't for some strange reason need to make the change to subshapes that don't apply to this issue, do I?  Like items that won't possibly move into areas where overlap is an issue, or dimensions that don't even move?  (Grasping at straws here...)

Thanks, Wapperdude for the guidance, I'm still trying to figure it out!   :-[

Michelle

wapperdude

There might be something else happening here...  in my test cases, I manually move the subshapes by clicking and dragging with the mouse.  When released, the object that is too close to the newly dragged shape pops away.  (As a sanity check you might want to verify that you get this behavior.)  However, sounds like you are moving the objects by formula,  I haven't tried that.  Per chance, do you have the formulas "guarded"?  If so, that might be the problem. 

A solution might be to add some conditional statements that check, as you suggested, to see if the shapes overlap.  This still might be done in the shapesheet, setting up the restrictions in either the User-Defined Cells or Scratch sections.

HTH
Wapperdude
Visio 2019 Pro