Sets which objects are selected and gripped
(sssetfirst gripset[pickset])
The gripset argument is ignored; the selection set of objects specified by pickset are selected and gripped.
You are responsible for creating a valid selection set. For example, you may need to verify that a background paper space viewport (DXF group code 69) is not included in the selection set. You may also need to ensure that selected objects belong to the current layout, as in the following code:
(setq ss (ssget (list (cons 410 (getvar "ctab")))))
Arguments
nil and no pickset is specified, sssetfirst turns off the grip handles and selections it previously turned on.
AutoCAD no longer supports grips on unselected objects, so this argument is ignored. However, if gripset isA selection set to be selected.
Return Values
The selection set or sets specified.
Examples
First, draw a square and build three selection sets. Begin by drawing side 1 and creating a selection set to include the line drawn:
Command: (entmake (list (cons 0 "line") '(10 0.0 0.0 0.0)'(11 0.0 10.0 0.0)))
((0 . "line") (10 0.0 0.0 0.0) (11 0.0 10.0 0.0))
Command: (setq pickset1 (ssget "_l"))
<Selection set: a5>
pickset1 points to the selection set created.
Variablepickset1 selection set:
Draw side 2 and add it to theCommand: (entmake (list (cons 0 "line") '(10 0.0 10.0 0.0)'(11 10.0 10.0 0.0)))
((0 . "line") (10 0.0 10.0 0.0) (11 10.0 10.0 0.0))
Command: (ssadd (entlast) pickset1)
<Selection set: a5>
Create another selection set to include only side 2:
Command: (setq 2onlyset (ssget "_l"))
<Selection set: a8>
pickset1 selection set:
Draw side 3 and add it to theCommand: (entmake (list (cons 0 "line") '(10 10.0 10.0 0.0)'(11 10.0 0.0 0.0)))
((0 . "line") (10 10.0 10.0 0.0) (11 10.0 0.0 0.0))
Command: (ssadd (entlast) pickset1)
<Selection set: a5>
Create another selection and include side 3 in the selection set:
Command: (setq pickset2 (ssget "_l"))
<Selection set: ab>
pickset2 points to the new selection set.
Variablepickset1 and pickset2 selection sets:
Draw side 4 and add it to theCommand: (entmake (list (cons 0 "line") '(10 10.0 0.0 0.0)'(11 0.0 0.0 0.0)))
((0 . "line") (10 10.0 0.0 0.0) (11 0.0 0.0 0.0))
Command: (ssadd (entlast) pickset1)
<Selection set: a5>
Command: (ssadd (entlast) pickset2)
<Selection set: ab>
pickset1 contains sides 1-4, pickset2 contains sides 3 and 4, and 2onlyset contains only side 2.
At this point,pickset1:
Turn grip handles on and select all objects inCommand: (sssetfirst nil pickset1)
(nil <Selection set: a5>)
pickset2:
Turn grip handles on and select all objects inCommand: (sssetfirst nil pickset2)
(nil <Selection set: ab>)
2onlyset:
Turn grip handles on and select all objects inCommand: (sssetfirst nil 2onlyset)
(nil <Selection set: a8>)
sssetfirst call replaces the gripped and selected selection set from the previous sssetfirst call.
Eachssget and ssgetfirst functions.
The