| Any time you want to
modify an entity in IntelliCAD you are required to select it. By selecting one or more
entities, you are nominating which objects an IntelliCAD command should act on. Select First
Entity selection is usually requested by any command that needs it. By default,
entity selections can also be made before a modification command is initiated. The ability
to create a selection and have a command act on it is controlled through settings for
Entity Selection. The Pre-pick box must be checked. Check your setting through Settings
> Drawing Settings... > Coordinate Input | Entity Selection.

Access the Drawing Settings dialog box to do all
the necessary fine-tuning to to the way your entity selection tools.
The Pre-pick status can also be controlled with the
PICKFIRST system variable. Examine the current status by entering (getvar
"pickfirst"). the defaut value is 1 (On). You can change the status by
typing at the keyboard or including in a LISP program (setvar
"pickfirst" x) where x is 0 (zero - Off) or 1 (on).
System variables are independent of drawing windows
and apply across the entire IntelliCAD session. Therefore setting pickfirst off while
working in one drawing window will set it off in all other drawing windows.
Picking the Right Selection
Having to select entities is one thing. Actually picking them out of the abundance
of lines in a drawing is quite another.
Where two entities are close together, IntelliCAD
will usually pick the one most recently added to the drawing.
You can improve your performance by decreasing the
size of teh Entity Selection pickbox - the onscreen area that IntelliCAD searches for the
entity you are trying to pick. Once again this is controlled through the settings for
Entity Selection... Settings > Drawing Settings... > Coordinate Input |
Entity Selection.
A larger pickbox size will decrease the need for you
to accurately position the cursor over lines, making it easier and faster to select
entities. It also makes it easier to select the wrong entity when lines are closely
spaced.
You can also control the pickbox size with the system
variable PICKBOX. Typing (getvar "pickbox") will return the
size of the current pickbox (in pixels). Use (setvar "pickbox" n)
to set the size of the pickbox, where n is some integer.
Selection Methods
IntelliCAD has a number of built-in selection methods that provide a range of ways
that individual or multiple entities might be selected. Users familar with AutoCAD should
note that IntelliCAD has some additional methods not found in AutoCAD (rose-colored
backgrounds below).
| Prompt box
option |
Abbrev |
Action |
| Select
all entities |
ALL |
Selects all entities
in the current drawing. |
| Add to
set |
A
+ |
Adds one or more
subsequent selections to the current set |
| Subtract
from set |
R
- |
Removes one or more
subsequent selections from the set |
| Previous
selection |
P |
Selects the
last-defined selection set |
| Last
entity in drawing |
L |
Selects the most
recently added entity in the current drawing |
| Window-Inside |
W
WI
BOX |
Selects entities
contained entirely within a rectangular selection window |
| Crossing
window |
C
CW
BOX |
Selects entities
contained entirely within or crossed by a rectangular selection window |
| Outside
window |
O
OW |
Selects entities
entirely outside a rectangular selection window |
| Window
polygon |
WP |
Selects entities
contained entirely within a polygon selection window |
| Crossing
polygon |
CP |
Selects entities
contained entirely within or crossed by a polygon selection window |
| Outside
polygon |
OP |
Selects entities
entirely outside a polygon selection window |
| Window
circle |
WC |
Selects entities
contained entirely within a circular selection window |
| Crossing
circle |
CC |
Selects entities
contained entirely within or crossed by a circular selection window |
| Outside
circle |
OC |
Selects entities
entirely outside a circular selection window |
| Point |
PO |
Selects any closed
entities that surround a selected point |
| Properties |
PRO |
Selects entities with
specific properties such as area, color or layer |
| Fence |
F |
Selects entities
crossing a line or line segments |
| Selection
Method |
D |
Displays the Drawing
Settings dialog box allowing selection settings to by changed |
| Undo |
U |
Undoes the last
selection |
Extra Notes
| Select all in the
current drawing window with Ctrl-A (a default keyboard shortcut) |
| A rectangular
selection window dragged to the right by default selects all entities contained within
(Window-Inside selection). |
| A rectangular
selection window dragged to the left selects all entities contained within and crossed by
the window boundary (Crossing window selection). |
More System Variables
We looked at PICKBOX and PICKFIRST system
variables above and how they could affect entity selection. There are even more system
variables that impact on entity selection. Here is the full list.
| PICKADD |
Controls
additive entity selection
Set to 0 (zero - Off) the most recently selected entities become the selection set.
Previously selected entities are deselected. Add more emtities to the selection set by
selecting with the Shft key pressed.
Set to 1 (default) all selections are added to the current selection set. Remove entities
by selecting with the Shft key pressed.
Multi-select mode checkbox. |
| PICKAUTO |
Auto
windowing control when the Select object: prompt displays.
Set to 0 (zero - Off) PICKAUTO is disabled.
Set to 1 (default) allows a recangular selection window to be drawn immediately.
Auto window checkbox. |
| PICKBOX |
Sets the
size of the object pickbox in pixels
Pickbox input box. |
| PICKDRAG |
Controls
rectangular selection window creation method
Set to 0 (zero - Off - default) a mouse click is required at diagonal corners of
the window.
Set to 1 one click is required to establish a corner of the window, the left mouse
button can be held down while dragging the window, and the second corner is the point at
which the mouse button is released.
Window drag checkbox. |
| PICKFIRST |
Controls
entity selection before command method
Set to 0 (zero - off) disables PICKFIRST.
Set to 1 (default) allows command to act on current selection set.
Pre-pick checkbox. |
You can use the regular (getvar) (setvar) functions
in LISP to interrogate and set these system variables or else use the checkboxes in the
Drawing Settings dialog box, Coordinate Input tab, Entity Selection option.
Automating Selection with LISP
The LISP (ssget) function returns a selection set. It is further
enhanced by accepting arguments that can be used to automate the inclusion of entities
into a selection set.
The full function syntax is
(ssget [mode] [point1 [point2]] [point-list] [filter-list]).
Arguments shown in square brackets are optional and
LISP knows by the format of the argument supplied which argument it is.
Mode
This is a string specifying the selection method (see Abbrev column in the table
above). If no mode or filter list is supplied, LISP prompts to select entities.
Additional to the modes listed above, mode
"X" is used to create a selection set of all entities in the drawing.
Point 1 and 2
These arguments specify the points defining a rectangular or circular (center,
radius) selection window provided in association with the mode.
Point-List
A list of points defining a polygonal selection window.
Filter-List
This argument may be used with any mode and allows finer control of the selection.
It is an association list similar to that returned by the entget function. The association
list is discussed further in an article Entity
Data List.
The filter list specifies the properties to check and
the values for each property to match.
Group codes
Group codes of properties most commonly used in filter lists.
| Group code |
Property |
Examples |
| 0 |
Entity
type |
"TEXT"
"LINE"
"CIRCLE" |
| 8 |
Layer |
Any
existing layer name
e.g. "0" |
| 62 |
Color |
1 (red)
2 (yellow)
3 (green)
4 (cyan)
5 (blue)
6 (magenta)
7 (white) |
Examples
In order to use a selection set we must assign it to a symbol. This is done using setq.
The ssget function returns the data that will be bound to the symbol.
(setq A
(ssget "X" '((0 . "TEXT") (8 .
"35TEXT")))
)
Assigns a selection set to symbol A of all text
entities in the drawing on layer 35TEXT.
Here is another way of constructing the filter list
that allows it to include variables:
(setq COLOR 3)
(setq A
(ssget "X"
(list (cons 62 COLOR))
)
)
Then you might use the selection set in some other
automated processing...
(command "ERASE" A)
...or in a manual action typed in the command
window...
:copy
>Select entities to copy: !A
>Entities in set: 4
>
>Multiple . Vector . Base point: |
Entering the symbol name prefixed with an exclamation
mark returns teh symbol data to the command prompt.
Efficent entity selection is an
important part of being able to make rapid changes to existing drawings. Knowing the
built-in options is helpful and with practice can help you use teh right combination of
tools to select just the entities that you want to work on.
Making changes to the system variables can
help you fine tune entity selection to sut your own style and the nature of your drawings
and the kind of modifications you need to make.
Being able to automate the selection process
where apporpriate will return you the best productive use of your time and help maximise
your software potential.
Code is provided "as-is" for purposes of instruction and utility and may be
used by anyone for any purpose entirely at their own risk. It is unsupported and without
warranty of any kind. No responsibility will be taken for any direct or indirect
consequences resulting from or associated with the use of this code.
|