(ssget [mode] [point1 [point2]] [point-list] [filter-list])


Ask the user to select entities.


This function prompts the user to select entities. When all arguments are left out, the ssget function prompts the user with the "Select entities:" prompt. This is the only situation when ssget highlights selected entities. The ssget function returns <Selection set: 26146268>. The selection set does not contain attributes nor polyline vertices.

The mode argument specifies the entity selection method:

Mode Meaning Points Example
  (none) Single pick point point1 (ssget '(10 15)) or (ssget)
"C" Crossing point1 point2 (ssget "C" '(1 1) '(2 2))
"CC" Crossing Circle point1 point2 (ssget "CC" '(1 1) '(2 2))
"CP" Crossing Polygon points-list (ssget "CP" ptlist)
"F" Fence points-list (ssget "F" ptlist)
"I" Implied none (ssget "I")
"L" Last none (ssget "L")
"O" Outside points-list (ssget "O" ptlist)
"OC" Outside Circle point1 point2 (ssget "OC" '(1 1) '(2 2))
"OP" Outside Polygon points-list (ssget "OP" ptlist)
"P" Previous none (ssget "P")
"PO" POint point1 (ssget "PO" '(1 1))
"W" Window point1 point2 (ssget "W" '(1 1) '(2 2))
"WP" Window Polygon points-list (ssget "WP" ptlist)
"X" All none (ssget "X")

The "I" mode creates an "implied" selection set of entities selected while system variable PICKFIRST is on. The "PO" mode selects all closed entities covering the specified point.

The point1 (and many times point2) argument specifies the pick point for the selection mode, as noted in the table above.

The filter-list argument is a list that specifies entity properties in dotted-pair format, such as:

(ssget "X" '((0 . "CIRCLE") (62 . 1)))

which selects all circles colored red (color 1). In addition, the special dotted-pair of -4 lets you include a relational test, such as:

(ssget "X" '((0 . "CIRCLE") (62 . 1) (-4 . "<") (40 . 15.0))

which selects all red circles less than 15 units in radius. For this function, the operators recognized by progeCAD are:

Operator Meaning
"&" Bitwise AND (integers only).
"&=" Bitwise masked equals (integers only).
"*" All.
"=" Equals.
"!=" Not equal to.
"/=" Not equal to.
"<>" Not equal to.
"<" Less than.
"<=" Less than or equal to.
">" Greater than.
">=" Greater than or equal to.

These operators are used with integers; the bitwise operators cannot be used with real numbers; the "*" operator is the only that can be used with strings.

NOTES

  • The current entity snap setting is ignored by the ssget function.
  • When the selection set is used in model space, paper space entities are not selected, and vice versa: entities from the space not currently in effect are filtered out. However, this does not apply when using the "X" selection mode.

Tell me about...

(ssdel entity-name selection-set)

(ssgetfirst)

LISP Compatibility

Programming Overview of LISP (LISt Processing) Language