Author Topic: possible to select all objects of similar layer,length and scale  (Read 4310 times)

0 Members and 1 Guest are viewing this topic.

hyposmurf

  • Guest
possible to select all objects of similar layer,length and scale
« on: December 22, 2005, 06:03:29 PM »
Is there a way to select one object and then AutoCAD find all similar objects and add them to your selection?This would all objects that are the same colour and for sintance a series of lines that have been copied across the drawing,or blocks,or everything on one layer etc.If theres a complex drawing going through the drawing individually selecting can be a PITB.Even if you like a reverse selection and select everything and then deselect what u dont want it can take a while.You could define your own groups or use the QSELECT,but this would still be slower.Ive seen lisps grab certain objects like a certain named block,is it possible to have that will select all objects that are the same,like same layer,same length,same scale etc?User could select one object then CAD would add all similar objects the selection set.I feel though the only way would be like individual lisps for each type of item to be selected. :|

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: possible to select all objects of similar layer,length and scale
« Reply #1 on: December 22, 2005, 06:23:43 PM »
Yea, you could call it the Omni Selector.

Pseudo code:

User to select an object

Get the available properties

Build a dialog box with check boxes for those properties
or use a dialog box with all properties, dimming properties unavailable

use an ssget with those properties that are acceptable to ssget

Iterate the selection set keeping items based on the remaining properties
that could not be tested with ssget

Viola, you have your selection set.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

hyposmurf

  • Guest
Re: possible to select all objects of similar layer,length and scale
« Reply #2 on: December 22, 2005, 06:31:09 PM »
Cool Im no lisper but I'll go away and see how far I can get with an attempt.I'm sure though I'll stuimble just being able to ssget. :-)

whdjr

  • Guest
Re: possible to select all objects of similar layer,length and scale
« Reply #3 on: December 22, 2005, 06:56:11 PM »
Have you ever tried the 'ssx' command.  I believe it is an Express Tool.  It might get you want you want.

Quote from: ExpressTools Help File
SSX

--------------------------------------------------------------------------------

Creates a selection set

Either type SSX at the Command prompt to create a "previous" selection set or type (SSX) in response to any Select Objects prompt.

SSX returns a selection set that is either exactly like a selected object or, if you adjust the filter list, very similar to that object.

Command: SSX
Select object/<None>: Use an object selection method to select a template object, or press ENTER for none
>>Block name/Color/Entity/Flag/LAyer/LType/Pick/Style/Thickness/Vector:


Filter Options
Block name Specifies the block name to add or remove.
Color Specifies the color number to add or remove.
Entity Specifies the object type to add or remove.
Flag Toggles the ENTITIES FOLLOW flag.
Layer Specifies the layer name to add or remove.
Ltype Specifies the linetype name to add or remove.
Pick Selects object(s) using any selection set method.
Style Selects the text style name to add or remove.
Thickness Specifies the thickness to add or remove.
Vector Specifies the extrusion vector to add or remove.

Note:
Once you have a filter list, any of the filters can be removed by selecting the option keyword and then pressing ENTER. If an item exists in the filter list and you elect to add a new item, the old value is overwritten by the new value. You can have only one of each type of item in a single (ssget 'x') call.


Usage Example:
Select a line to use as a template object, but remove the layer filter.

Command: SSX
Select object/<None>: Select a line
Current Filter: ((0 . "LINE") (8 . "0") (39 . 2.0) (62 . 1) (210 0.0 0.0 1.0))
Enter filter option [Block name/Color/Entity/Flag/LAyer/LType/Pick/Style/Thickness/Vector]: layer
>>Layer name to add/<RETURN to remove>: Press ENTER to remove layer filter
Current Filter: ((0 . "LINE") (39 . 2.0) (62 . 1) (210 0.0 0.0 1.0))
Enter filter option [Block name/Color/Entity/Flag/LAyer/LType/Pick/Style/Thickness/Vector]: Press ENTER
To select objects that match the filter, enter "previous" at the next Select Objects prompt.



--------------------------------------------------------------------------------
 Command line: SSX
 Files: ssx.lsp

hyposmurf

  • Guest
Re: possible to select all objects of similar layer,length and scale
« Reply #4 on: December 22, 2005, 07:47:35 PM »
 8-)That sounds just like what I am after.I'll have a go later,need to reinstall my express tools on my home PC since reinstalling my registry it seemed to knock a few things out.Thanks whdjr.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: possible to select all objects of similar layer,length and scale
« Reply #5 on: December 23, 2005, 08:28:57 AM »
Good one Will.
The lisp SSX is in the Express folder.
It would be nice to combine the Qselect interface with the SSX routine.
In fact if the Qselect would allow multiple selections in the properties
window it would be a great routine.
I think that a vl version would simplify the selection of properties.
I'll look around some more to see if someone has done it already.
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Jeff_M

  • King Gator
  • Posts: 4087
  • C3D user & customizer
Re: possible to select all objects of similar layer,length and scale
« Reply #6 on: December 23, 2005, 11:29:49 AM »
There's also the FILTER command......

hyposmurf

  • Guest
Re: possible to select all objects of similar layer,length and scale
« Reply #7 on: January 28, 2006, 07:09:30 PM »
I'd love to see what you can find CAB. :-)
I've been playing with that SSX command and just fiddled to see what can be done with it.This macro will grab all MTEXT objects and change their colour to colour 2. :-)
^C^C__ssx;;e;mtext;;chprop;(SSX);;e;mtext;;;C;2;;
« Last Edit: January 28, 2006, 07:17:42 PM by hyposmurf »