Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
1

How to select only objects within a selection marquee?

Explorer ,
May 24, 2011 May 24, 2011

I am a new user of Illustrator CS5, switching from Freehand. I am trying to find out if there is a way to select only the objects within a selection marquee? In AutoCAD you can make a selection window from left to right and only those objects entirely within the window are selected. If you window from right to left all objects that are "crossed" or touched by the window are selected. Is there a similar technique in Illustrator?

Currently I have to select the objects, then go back and hold the shift key to deselect the object I don't want, or lock layers to prevent extra objects getting selected.

62.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 2 Correct answers

Community Expert , May 25, 2011 May 25, 2011

Hi Wade, I scripted it the way Marie originally wanted it, by defining a "window".

keyboard short cuts for scripts do not stick

I have made a coupe of tutorials on how to run scripts via 2-clicks and shortcut key stroke for Windose. They don't involve programming, so I wonder if there are similar features on the Mac that could do something similar. Hover the mouse over my username to check those out.

drawRectToSelect.PNG

#target Illustrator

//  script.name = selectWithinRect.jsx;

//  script.description = selects all item

...
Translate
Community Expert , Sep 04, 2012 Sep 04, 2012

No

Translate
Adobe
replies 100 Replies 100
Community Expert ,
May 24, 2011 May 24, 2011

Try the lasso tool

Picture 6.png

Works better than a marque as you are not limited to only square shapes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 24, 2011 May 24, 2011

I'm new to Illustrator, what does the lasso tool do?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 24, 2011 May 24, 2011

It simply makes selections.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 24, 2011 May 24, 2011

This might help explain what I am attempting to do. I tried the lasso tool, it still selects anything it touches, not just the objects inside the selection window.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 24, 2011 May 24, 2011

Ngaio9 wrote:

I'm new to Illustrator, what does the lasso tool do?

It doesn't do what you want that would be a good option if there were a way of invoking it with a keyboard toggle.

Th lasso tool does pretty much what one would expect it to do it selects any object or path that falls within the area you outline with the tool on the canvas so if the object is only partially in the area it will be selected.

It would be nice to have a toggle to select only objects that fall completely within the selection area or perhaps even something more sophisticated like settings for that fall within the selected area but only on the current layer or of  certain color fill as well,etc.

Only way to do what you want is to use the layer panel and that can be a bit blind sided. At least that I know of and of course an entirely different process than you desire.

I think this would be a helpful feature but zI would like it as a toggle rather than a change.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 24, 2011 May 24, 2011

Yes, a toggle would be the way to go. Maybe in the next version. Thanks, Marie

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 24, 2011 May 24, 2011

Picture 2.png

Say you want to select just the pink dots and not the blue ones, just drag round them like this with the lasso tool and they'll be selected on mouseup.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 24, 2011 May 24, 2011

What if the pink dots overlap the blue dots? Here is an illustration of what I am trying to do.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 24, 2011 May 24, 2011

Ain't no picture there. Use the camera thingummy in the reply window to send pictures.

camera.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 24, 2011 May 24, 2011

Marie wants to be able to do this, where the dotted line is your lasso selection.

I think the Lasso Tool would be a better place to put the feature rather than the direct select or the selection tool
as you can define a more random selection. and what would be great is if you could access the lasso tool when using
another tool with command l for the traditional way of selecting and option L for the way marie would also be able to select.

I bet if she visited the scripting forum she might get those guys on it and a script might work.Problem there is keyboard short cuts for scripts do not stick
so you might have to create an action invoking the script and assign keyboard to the action.

It is a very good feature and should be implemented.

Screen shot 2011-05-24 at 9.49.43 PM.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

Hi Wade, I scripted it the way Marie originally wanted it, by defining a "window".

keyboard short cuts for scripts do not stick

I have made a coupe of tutorials on how to run scripts via 2-clicks and shortcut key stroke for Windose. They don't involve programming, so I wonder if there are similar features on the Mac that could do something similar. Hover the mouse over my username to check those out.

drawRectToSelect.PNG

#target Illustrator

//  script.name = selectWithinRect.jsx;

//  script.description = selects all items fully enclosed by a top most Rectangle;

//  script.required = draw the "selection Marquee" Rectangle first before running;

//  script.parent = carlos canto // 5/25/11;

//  script.elegant = false;

var idoc = app.activeDocument;

var topPath = idoc.pathItems[0];

var tpVB = topPath.visibleBounds;

var left = tpVB[0];

var top = tpVB[1];

var right = tpVB[2];

var bottom = tpVB[3];

for (i = 1 ; i<idoc.pageItems.length; i++)

     {

          

          var iart = idoc.pageItems;

          

          if (isPointIn(top,left,bottom,right,iart) == "true")

               {

                    iart.selected = true;

               }

          //alert(isPointIn(top,left,bottom,right,iart));

     }

topPath.remove();

function isPointIn(top,left,bottom,right,iart)

     {

          var vb = iart.visibleBounds;

          ileft = vb[0];

          itop = vb[1];

          iright = vb[2];

          ibottom = vb[3];

          

          if ( ileft>left && itop<top && iright<right && ibottom>bottom)

               return "true";

          else

               return "false";

     }

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

@Carlos: you need Third Party Software on the Mac, but then it's possible. I guess that QuickKeys would work, Spark does as well: http://www.cultofmac.com/cult-of-mac-favorite-spark-mac-os-x-utility/10153

The scripts need to reside in ExtendScript's trusted folder.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

Hi Monika, there it is then, good option.

I've never touched a Mac but I've seen a bar at the bottom with shortcuts? in it.Can you put a shortcut to the trusted scripts folders in there? and if you can, does it act like a menu (like in windows) listing the files in that folder? or it will merely open the folder?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011

Sounds like there are lots of ideas here but I honestly have no idea what

you are all talking about! I use a computer the way I use a car, I don't

know how it works but I know how to make it go. Any "for Dummies"

explanations?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

hahaha good analogy, for starters, does the script do what you wanted to do? based  on the screen shot

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011

Yes, that's the idea.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

ok,

- copy the script from previous post

- open Adobe ExtendScript Toolkit

- paste the copied script

- save the script with a meaningful name

to run double click on the script.

if you want to run it from within Illustrator -> File -> Scripts Menu

- save the script here:

C:\Program Files\Adobe\Adobe Illustrator CS5\Presets\en_US\Scripts\

- restart Illustrator

folder path is for Windows...I guess mac would be similar path

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011

You lost me with copy the script.

What is a script?

What and where is the Adobe ExtendScript Toolkit

Save what with a meaningful name.

Doubleclick where and on what?

Does this then create a button or keystroke command in Illustrator? Does it

change the actual marquee?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

What is a script? - the text below the screen shot, in post 11. It is a sequence of commands Illustrator reads and excutes accordingly.

What and where is the Adobe ExtendScript Toolkit - a program to create/edit scripts. It comes with Illustrator, it should be in the adobe folder neighborhood.

Save what with a meaningful name. - the script

Doubleclick where and on what? - on the saved script

Does this then create a button or keystroke command in Illustrator? - it adds a menu item in Illustrator under, File->Scripts menu

Does it change the actual marquee? - no, you draw the "marque" with the Rectangle Tool

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011

Ok, got as far as opening the Toolkit and copy pasting the script. Where do

I save it to?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

great!!!!

- save the script here:

C:\Program Files\Adobe\Adobe Illustrator CS5\Presets\en_US\Scripts\

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011

Well, did as directed. I'm on a Mac so the toolkit is in Utilities/Adobe

Utilities-CS5/ExtendScript Toolkit/.

Restarted Illustrator, went to File>Scripts> and selected my new script.

Now all I get is a swirly disc for the last 5 minutes and no action. Seem to

have jammed things up good. I can't even get Illustrator to come to the

front so I can try to force quit the program.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2011 May 25, 2011

Marie, we've made some progress if it shows in the Illustrator scripts menu, were you able to get it to work?

Monika/Wade, can you test if it works on a Mac please?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 25, 2011 May 25, 2011

No, it crashed the program.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines