Author Topic: Area select without dragging background  (Read 17146 times)

0 Members and 1 Guest are viewing this topic.

YossiD

  • Jr. Member
  • **
  • Posts: 74
Area select without dragging background
« on: January 06, 2009, 01:34:58 AM »
I often need to select multiple shapes that are located over a background shape. Is there a way to avoid selecting and dragging the background shape when using Area Select?

Here are the solutions I've found so far. None of them is very convenient:

1. Selecting the shapes one by one. This is a real pain when there are lots of small shapes as when working with CAD images imported into Visio.

2. Starting the selection area outside the background shape. Doesn't work well when there are other shapes in the way or when zoomed-in so edges of the background shape are off screen.

3. Protect background shape from selection. Best solution so far, but a nuisance if background shape needs to be selectable later.

Anybody have a better solution?

Thanks.

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4400
  • Ideas Visio-lized into solutions
Re: Area select without dragging background
« Reply #1 on: January 06, 2009, 11:14:41 AM »
I think you pretty much have hit it on the head.  Your #2 approach is the most generally used.  You can hold the shift key down and click a selected shape to de-select it.  Also not terribly convenient if you're zoomed in and can't see the selection points for verification.

The other thing you can try is using layers, but, that's not very convenient either.
Visio 2019 Pro

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1734
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Area select without dragging background
« Reply #2 on: January 06, 2009, 09:29:15 PM »
Hi YD,

Yes, this is sometimes a bit maddening. Layers and background pages might help, but might also be impractical.

There's a setting under Tools > Options > General Tab  called "Select shapes partially within area", but it's almost the opposite of what you need.

With this setting, any shapes that touch the "selection rectangle" get selected. Ie: you don't have to draw a net around an entire shape to select it.

Might help in some circumstances, anyway...
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

YossiD

  • Jr. Member
  • **
  • Posts: 74
Re: Area select without dragging background
« Reply #3 on: January 07, 2009, 01:00:47 AM »
Thanks for the replies. I was hoping there was some kind of simple solution, like a key combination that told Visio to ignore the shape under the cursor when using Area Select. Guess not.

1. I had thought of layers, but I'd never used them before and I couldn't find a quick description in the help of how to do so. In the meantime I've found some explanations and tried it out. works ok, but also inconvenient. Is there a way to get the Layer Properties dialog to stay open (similar to the Size & Position window)?

2. Also, deselecting shapes seems to be a one by one affair, and I have found some shapes, especially lines, nearly impossible to deselect. Is there a way to use Area Select to deselect?

3. A related question. Older versions of Visio clearly displayed which shapes were selected as the selections were shown individually. Newer versions indicate the entire area enclosing the selected shapes, even if there are shapes within the area that are not selected. The coloring that distinguishes selected shapes from those that aren't is not always easy to see, especially with very small shapes, and I frequently end up with unwanted shapes in selections. Is there a way to display selections the old way with current versions of Visio? I'm using 2003.

cbk780

  • Newbie
  • *
  • Posts: 3
Re: Area select without dragging background
« Reply #4 on: November 02, 2011, 05:54:40 PM »
I have been a Visio user for 20 years and find this the most maddening problem with the product. As a UI designer, I often have panels and windows that are behind the controls I am designing.

I have tried protection but it is so deeply buried that it is not convenient to use.

What is needed is a simple way to mark a shape and indicate that the shape should not be selectable. Obviously you need a way to reverse this as well. I think that the ideal way to do this would be a right mouse menu option that would toggle between "protect shape from selection" and "make shape selectable."

I am wondering if Visio would allow you to create some form of macro that could do this. I don;t know much about its programmatic capabilities.

Charlie
« Last Edit: November 02, 2011, 05:56:30 PM by cbk780 »

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: Area select without dragging background
« Reply #5 on: November 02, 2011, 06:00:52 PM »
Select the shape to protect/unprotect
menu Format -> Protection
and toggle the box "From selection"
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

cbk780

  • Newbie
  • *
  • Posts: 3
Re: Area select without dragging background
« Reply #6 on: November 02, 2011, 07:32:01 PM »
Paul:

Thanks for your quick reply.

I was aware of the protection option. I took another look at it after reading your post.

One thing I noted in Visio 2010 is that you need to enable the Developer tab.

The part I always disliked about shape protection is that it requires you bring up the Drawing Explorer window. Then you need to right click at the top of the tree and bring up the Protect Document dialog. Then you need to set shape protection on.

At that point, if I understand it correctly, all shapes in the document are protected.

Now if I want to unprotect a shape, I cannot do it without going back to the Drawing Explorer dialog since the shape cannot be selected to unprotect.

So, it works but at a cost in inconvenience that is way too high. It takes about six steps to protect or unprotect a shape.

I keep hoping that Visio will correct this problem but in 20 years, it has not happened.

Perhaps this is not as big a problem for others. But when you are designing UI's it is common to have many shapes on top of each other.

Am I missing something in the way I understand this?

Best,

Charlie

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: Area select without dragging background
« Reply #7 on: November 02, 2011, 07:44:30 PM »
You don't need the document explorer, just click on the shape.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4400
  • Ideas Visio-lized into solutions
Re: Area select without dragging background
« Reply #8 on: November 02, 2011, 07:50:36 PM »
An interesting Catch22 -- set a shape so it's temporarily no selectable.  Then, later on, how do you select it to make it selectable? 

So, it needs to be some sort of toggle functionality.  The shift key kinda does that.  But, for overlaid shapes, need some means of traversing thru the vertical ordering.  The Drawing Explorer gives you the visibility, but not the toggling functionality.  Also, it's sort of hit and missing determing the correspondence between shapes listed in the DE and shapes on the drawing page.  It would seem that the necessary ingredients are present, they just haven't been setup to do the job.

Wapperdude
Visio 2019 Pro

wapperdude

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4400
  • Ideas Visio-lized into solutions
Re: Area select without dragging background
« Reply #9 on: November 02, 2011, 07:53:46 PM »
Actually, Paul, I think you do need the DE.  Right click shape > Format > Protection > From Selection brings up another window about using the DE.  If you don't follow thru, then the shape is still selectable.  At least, that's how it is in V2003 & V2007.

Wapperdude
Visio 2019 Pro

cbk780

  • Newbie
  • *
  • Posts: 3
Re: Area select without dragging background
« Reply #10 on: November 02, 2011, 07:55:02 PM »
Hi Paul:

Perhaps I am misunderstanding. If the drawing explorer is not checked, Visio displays this message "Shapes protected from selection can still be selected unless you check Shapes in the Drawing Explorer Protect Document dialog box."

And it seems to me that protection is not reversible. I cannot unprotect the shape because it cannot be selected. So the protection command is disabled. To unprotect the shape I seem to need to go to the Drawing Explorer Dialog and uncheck protect shapes. Then I can unprotect an individual shape.

It can be done but it's very clunky.

Unless I am really misunderstanding how this works.

Best,

Charlie

AndyW

  • Sr. Member
  • ****
  • Posts: 326
    • PC Mimic Diagram
Re: Area select without dragging background
« Reply #11 on: November 03, 2011, 03:28:00 AM »
How about adding some code to your document. This catches the event for the selection change and if it is an area select, removes some shapes from the selection (in this case shapes with the text, L). This still allows your background shape to be selected as only comes into play if you are doing an area selection.

Code

Private WithEvents vsoApp As Visio.Application

Private Sub Document_DocumentOpened( _
    ByVal doc As IVDocument)

    Set vsoApp = doc.Application
   
End Sub

Private Sub vsoApp_SelectionChanged( _
    ByVal Window As IVWindow)

    Dim vsoSelection As Visio.selection
    Dim vsoShape As Visio.Shape
    Dim lngScopeID As Long
   
    Set vsoSelection = ActiveWindow.selection
   
    lngScopeID = vsoApp.CurrentScope
   
    If lngScopeID = 1210 Then   'Area Select
   
        For i = vsoSelection.Count To 1 Step -1
       
            Set vsoShape = vsoSelection(i)
           
            If vsoShape.Text = "L" Then
           
                Call ActiveWindow.Select(vsoShape, visDeselect)
               
            End If
           
        Next
   
    End If
   
End Sub

« Last Edit: November 03, 2011, 03:34:20 AM by AndyW »
Live life with an open mind

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1734
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Area select without dragging background
« Reply #12 on: November 03, 2011, 03:50:06 AM »
If you are using Visio 2010, there is a new feature that allows you to turn off "quick drag" for specific areas within a shape. The new Containers use this, so that you can put shapes inside a container, yet still drag-select them without selecting the background container.

Each Geometry section in the ShapeSheet now has a GeometryN.NoQuickDrag cell. Set this to TRUE, and the area enclosed by the geometry is no longer selectable. You have to click on the border of the geometry, or drag select the whole shape.

For non-Visio-2010 solutions, I've resorted to background pages--even linking filled areas on the background to non-filled outlines on the foreground page, so that the background shapes moved and sized to stay in synch with the foreground.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3286
    • Paul Herber's website
Re: Area select without dragging background
« Reply #13 on: November 03, 2011, 04:20:21 AM »
Hi Paul:

Perhaps I am misunderstanding. If the drawing explorer is not checked, Visio displays this message "Shapes protected from selection can still be selected unless you check Shapes in the Drawing Explorer Protect Document dialog box."

Oops, I should have tried it first! Sorry.
Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

Gregory Jackson

  • Jr. Member
  • **
  • Posts: 55
    • Art Empowers WorldWide
Re: Area select without dragging background
« Reply #14 on: November 03, 2011, 04:56:52 PM »
Well I use panels/sectionals/background how ever you want to describe them. The quickest way to do this is Layers. Once you start using layers you will come to love them.. solves your issue quickly. OR you can select everything including the box then hold down the CTRL key and deselect the background box.

But really I think layers is the best way to go.. just my 2 cents

Good Luck...