Select shapes inside other shapes

Started by Jennifer, January 20, 2017, 08:40:55 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jennifer

Is there a way to select a group of shapes that are inside of a collection of shapes and where there is not rectangular area around the shapes?

For example, suppose I have a grid of 30 x 30 squares and I want to select the ones on rows 3-5 and columns 11-14.
Using Visio 2019, part of Office 365 on Windows 10

Surrogate

Jennifer,
just open group which containet these shapes


wapperdude

If I understand correctly:
  1) there is an array of shapes, placed in an array pattern.
  2) all of these shapes belong to 1 major group or container, there is no other grouping of these shapes.
  3) you want to select certain shapes, which maybe any combination of shapes, sometimes adjacent to each other along a row or a column.
  4) you would prefer not to select each shape one at a time to create a selection grouping, but want to use some form of mouse click and drag technique.

Are all of these correct?  Especially (2)?  Also, is there spacing between the shapes, like kitchen counter tile, or are they butted together like floor carpet squares?

If these are grouped, and if there is spacing between shapes then
   a) set group properties to select members first.  Don't know how this works with containers.
   b) use the mouse and shift key to lasso the shapes.  Only shapes completely within the selection rectangle are selected.
       The holding shift key down adds additional shapes to selection.

More difficult if shapes are touching.  I think you have to start the selection outside the boundary of the array, then move to surround shapes you want.  You will get more than the desired shapes, so you'll have to go back and click those a 2nd time to deselect.

Again, not sure how this works with containers.

Wapperdude
Visio 2019 Pro

Jennifer

All,

Thanks for the comments. I see now that I did a terrible job of explaining the situation. My apologies. Let me try again:

I have an array or grid of square shapes, which I refer to as "cells". The grid might be 40x40 or 100x100. The cells are all independent -- not in a group or container. Behind the grid is a larger shape extending beyond the edges of the grid. I have attached a smaller example.

BTW: How come the image is not displayed when I preview the post? I see now that it is visible once the post is posted.

Sometimes I need to change the fill color of a group (small "g") of cells, such as the ones in a 5x10 block in rows 26-30 and columns 11-20 (50 cells). Rather than clicking on each one to get the block selected, I was wondering if there is any way to use the pointer to drag a rectangle around those cells and select them. If the cells are at the edge of the grid (yellow group), I can start the selection outside the larger shape and drag into the grid. But if I try to start the selection inside the grid (green group), I will select the larger shape instead.

Is there any way to drag a rectangle around the green cells without selecting anything else?

I tried Alt+Click and drag. It doesn't do anything. So it appears that Alt+Click could be used to start a selection rectangle without selecting anything that happens to be at the starting point. While I am at it, I would also like a way to move the edges of the selection rectangle after it is established.
Using Visio 2019, part of Office 365 on Windows 10

vojo

behavior is member first

select for first child then shift select adds additional child shapes to the selection array of shapes.
(don't need to lasso children).
Actions against the array (change color, change text, to group within group, forward/backward within group, etc)

Never have done much with containers but some simple testcases will show behavior
( I bet RE this thread, its similar to group)

All that said, there are a couple of anomalies with 2013
- Transparency to array changes colors of all shapes in group to whatever is in the paint button
- custom props are presented differently if at group level vs child level

vojo

i.e. in your picture, yellow would take
- 1 click for first child
- 11 shift clicks for other children
- then change color

then can set new color or whatever

Of course, if you use that grid enough, could automate at the group level (VBA or shape smarts)  ;-) ;-) ;-)

Jennifer

Quote from: vojo on January 20, 2017, 06:12:26 PM
i.e. in your picture, yellow would take
- 1 click for first child
- 11 shift clicks for other children
- then change color

then can set new color or whatever
I know how to select multiple shapes with either Shift-Click or Ctrl-Click. That's fine for a few shapes. But not so fine for 50 or 100. I am looking for a way to lasso a group of shapes where there is no empty space nearby to start the click and drag.

What am I saying that is making this so hard to understand?
Using Visio 2019, part of Office 365 on Windows 10

wapperdude

I'm not aware of anything simple.  For the yellow shapes, relatively easy.  Assumes that you do not select partial shapes enabled.  So, start outside of the entire area above and to left of the yellow group, but do not include entire shape(s) to the left of yellow.  Hold the left key down, drag to just beyond the lower right yellow shape.  Only the yellow shapes should now be completely surrounded, and will be selected.  Change as desired.

The green shapes are more difficult.  You can use the same technique, but it will include either the shapes above the green or to the right of green or...you get the point.  Once selected, you can then go back, same technique, and deselect the unwanted shapes.

Another approach, for example, select all of the shapes  from top to bottom, that are to the right of the green group.  Group these, (Big "g"   ;) ) and deselect.  Now, you can easily select just the greenies, do what is desired, and unselect.  Then, select and ungroup the Big G to return everyone to their normal independent state.   :)  Basically, you have to be creative, and manipulate the limitations that Visio gives you.  There is no immediate, simple solution for the greenies.

Sorry about any previous inference wrt to the selection process, was just trying to be thorough.

HTH
Wapperdude
Visio 2019 Pro

Jennifer

Quote from: wapperdude on January 20, 2017, 08:09:03 PM
I'm not aware of anything simple.  For the yellow shapes, relatively easy.  Assumes that you do not select partial shapes enabled.  So, start outside of the entire area above and to left of the yellow group, but do not include entire shape(s) to the left of yellow.  Hold the left key down, drag to just beyond the lower right yellow shape.  Only the yellow shapes should now be completely surrounded, and will be selected.  Change as desired.

The green shapes are more difficult.  You can use the same technique, but it will include either the shapes above the green or to the right of green or...you get the point.  Once selected, you can then go back, same technique, and deselect the unwanted shapes.
I know I can deselect the unwanted shapes one by one by Ctrl-Clicking on them. But can I deselect them using the lasso the saem way I did to select all of them? I couldn't get that to work.

QuoteAnother approach, for example, select all of the shapes  from top to bottom, that are to the right of the green group.  Group these, (Big "g"   ;) ) and deselect.  Now, you can easily select just the greenies, do what is desired, and unselect.  Then, select and ungroup the Big G to return everyone to their normal independent state.   :)  Basically, you have to be creative, and manipulate the limitations that Visio gives you.  There is no immediate, simple solution for the greenies.

HTH
Wapperdude
I actually found a work-around. It's not what I would call a solution, but it works. I just assign the background image to a layer and then make that later non-displaying. Once that shape is gone, I can use the lasso as long as I am careful not to include all of any neighboring cells.

I also tried making the background shape "not selectable", but then I get a warning message that this doesn't really make them non-selectable unless I set some other setting, which I don't have to to research.

Anyway, I'm good for now.
Using Visio 2019, part of Office 365 on Windows 10

Yacine

A smart shape with macro could do the job.
Drag selection shape over region, a double click would include all the shapes inside and delete the "selection" shape.
But how often would it be needed? Is it worth developing it?
Yacine

Yacine

@Jennifer, Your last post gave me the right idea.
Use the lasso tool, but start outside the shapes area. Go with a straight line to desired shapes and enclose them with a loop. That's it.
Yacine

wapperdude

For completeness, picture is 1000 words, etc.  Here's illustration of what I was saying.  Not complicated.

The dashed line rectangles represent the selection boxes.  As stated, yellow is easy.  The green requires an additional step, creating a group ... the blue shapes.  Then, select the green shapes.  Blue group will not be selected because it is not completely in the green selection box.  When done, ungroup the blue.

Wapperdude
Visio 2019 Pro

Jennifer

Quote from: Yacine on January 20, 2017, 08:35:40 PM
@Jennifer, Your last post gave me the right idea.
Use the lasso tool, but start outside the shapes area. Go with a straight line to desired shapes and enclose them with a loop. That's it.
Wowie Zowie!!! That's it.  ;)

I thought the Pointer tool was the Lasso tool. I never knew there was another one over in the Editing section. That works perfectly and it will select non-rectangular collections.

I am such a happy camper!!! Yippee. This will save me a ton of time. Thank you. Thank you. Thank you.

PS: My apologies to any of the previous responders who assumed I knew what I was talking about when I used the term "Lasso tool".
Using Visio 2019, part of Office 365 on Windows 10

Yacine

Don't worry, we are used to people who don't know what they are talking about.  ;D ;D ;D
Yacine