Welcome
Expand Getting StartedGetting Started
Expand SOLIDWORKS API HelpSOLIDWORKS API Help
Expand SOLIDWORKS PDM Professional API HelpSOLIDWORKS PDM Professional API Help
Expand FeatureWorks API HelpFeatureWorks API Help
Expand SOLIDWORKS Costing API HelpSOLIDWORKS Costing API Help
Expand SOLIDWORKS Document Manager API HelpSOLIDWORKS Document Manager API Help
Expand SOLIDWORKS Routing API HelpSOLIDWORKS Routing API Help
Expand SOLIDWORKS Simulation API HelpSOLIDWORKS Simulation API Help
Expand SOLIDWORKS Sustainability API HelpSOLIDWORKS Sustainability API Help
Expand SOLIDWORKS Toolbox API HelpSOLIDWORKS Toolbox API Help
Expand SOLIDWORKS Utilities API HelpSOLIDWORKS Utilities API Help
Expand eDrawings API HelpeDrawings API Help
Expand DraftSight API HelpDraftSight API Help
Expand Lisp Programming BasicsLisp Programming Basics
Expand Lisp Functions OverviewLisp Functions Overview
Collapse Lisp Functions ReferenceLisp Functions Reference
Lisp Functions by Alphabetical Order
*error*
+ (Addition)
- (Subtraction)
* (Multiplication)
/ (Division)
1+ (Increment)
1- (Decrement)
Equal
Not equal
Greater than
Greater than or equal
Less than
Less than or equal
~ (Bitwise NOT)
abs
acad_colordlg
acad_strlsort
action_tile
add_list
alert
alloc
and
angle
angtof
angtos
append
apply
ascii
assoc
atan
atof
atoi
atom
atoms-family
boole
boundp
car
caaaar ... cddddr
cdr
chr
client_data_tile
close
command
cond
cons
cos
defun
dictadd
dictnext
dictremove
dictrename
dictsearch
dimx_tile
dimy_tile
distance
distof
done_dialog
end_image
end_list
entdel
entget
entlast
entmake
entmakex
entmod
entnext
entsel
entupd
eq
equal
eval
exit
exp
expand
expt
fill_image
findfile
fix
float
foreach
gc
gcd
get_attr
get_tile
getangle
getcfg
getcname
getcorner
getdist
getenv
getfiled
getint
getkword
getorient
getpoint
getreal
getstring
getvar
graphscr
grclear
grdraw
grread
grtext
grvecs
handent
help
if
initget
inters
itoa
lambda
last
length
list
listp
load
load_dialog
log
logand
logior
lsh
mapcar
max
mem
member
menucmd
menugroup
min
minusp
mode_tile
namedobjdict
nentsel
nentselp
new_dialog
not
nth
null
numberp
open
or
osnap
pi (Constant)
polar
prin1
princ
print
progn
prompt
quit
quote
read
read-char
read-line
redraw
regapp
rem
repeat
reverse
rtos
set
set_tile
setcfg
setenv
setfunhelp
setq
setvar
setview
sin
slide_image
snvalid
sqrt
ssadd
ssdel
ssget
sslength
ssmemb
ssname
start_dialog
start_image
start_list
startapp
strcase
strcat
strlen
subst
substr
tan
tblnext
tblobjname
tblsearch
term_dialog
terpri
textbox
textpage
textscr
trans
type
unload_dialog
vector_image
ver
vmon
vports
wcmatch
while
write-char
write-line
xdroom
xdsize
zerop
Hide Table of Contents

ssget

(ssget [mode] [point1 [point2]] [point_list] [filter])

The ssget function creates a new selection set.

Arguments

mode

Selection mode. The mode argument specifies the method to apply for entity selection.

You can set mode to one of the following values:

Mode Meaning
- The interactive selection mode has started prompting the user to specify entities.
"_C" Crossing
"_CP" Crossing Polygon
"_F" Fence
"_I" Implied selection (entities selected while PICKFIRST is in effect and a preselection set is active).
"_L" Last entity
"_P" Previous selection set
"_W" Window
"_WP" Window Polygon
"_X" Filtered Selection

point1 / point2

point1 / point2 may point to a drawing point or to a list of drawing points.

The variable mode controls the appropriate interpretation:

  • If you specify the selection modes "_C" and "_W", point1 and point2 contain the coordinates required for the selection window.
  • If you specify "_CP", "_WP", or "_F", point1 must point to a list of drawing points that form the polygon to select the drawing entities; in this case point2 is ignored.

filter

Association list. Filter containing additional selection criteria. For example, you can specify certain entity types, entity properties, coordinate areas, etc. in the filter list. Geometric as well as non-geometric criteria allow flexible selection methods.

point_list

List of points defining a polygon or fence.

Relational Tests

The special group code -4 allows numerical comparison. Any relational test must be invoked with this code. The value of the group code is a string specifying the operator.

Logical Operators

Logical operators are also specified via a group code -4. In this case the group code is used to start and to terminate an expression for logical comparison. Starting the operation is indicated by a '<' sign before the operator keyword (e.g. "<OR") as first expression in a list containing the contents of the logical comparison. Termination of the comparison expression is signaled by a '>' behind the operator keyword (e.g. "OR>").

The following possibilities also may be used nested:

...'((-4 . "<AND") [expression1] ...(-4 . "AND>")) ...'((-4 . "<OR") [expression1] ...(-4 . "OR>")) ...'((-4 . "<XOR") [expression1] ...(-4 . "XOR>")) ...'((-4 . "<NOT") [expression1] (-4 . "NOT>"))

Return Value

If the function fails, it returns nil.

Examples

(ssget)

(ssget '(10 10))

(ssget "_X")

(ssget "_I")    ; Returns a selection set of all pre-selected entities

(ssget "_I" '((0 . "LINE")))    ; Returns a selection set of all pre-selected line entities

(ssget "_P")

(ssget "_L")

(ssget "_W" '(0 0) '(100 100))

(ssget "_WP" '((0 0) (0 100) (100 0)))

(ssget "_F" '((0 0) (15 15) (15 0)))

(ssget "X" '((0 . "LINE"))) ; selects all lines (ssget "X" '((0 . "CIRCLE") (8 "0"))

(ssget "_C" '(0 0) '(10 10) '((0 . "CIRCLE")))    ; all circles crossing the window 0,0 10,10

(ssget "X" '( (-4 . "<OR")

   (-4 . "<AND")(0 . "TEXT")(40 . 10)(-4 . "AND>")

   (0 . "CIRCLE")

   (-4 . "OR>")))

(ssget "X" '((0 . "TEXT") (-4 "=") (40 . 10)))



Provide feedback on this topic

SOLIDWORKS welcomes your feedback concerning the presentation, accuracy, and thoroughness of the documentation. Use the form below to send your comments and suggestions about this topic directly to our documentation team. The documentation team cannot answer technical support questions. Click here for information about technical support.

* Required

 
*Email:  
Subject:   Feedback on Help Topics
Page:   Function ssget
*Comment:  
*   I acknowledge I have read and I hereby accept the privacy policy under which my Personal Data will be used by Dassault Systèmes

Print Topic

Select the scope of content to print:



x

We have detected you are using a browser version older than Internet Explorer 7. For optimized display, we suggest upgrading your browser to Internet Explorer 7 or newer.

 Never show this message again
x

Web Help Content Version: API Help (English only) 2019 SP04

To disable Web help from within SOLIDWORKS and use local help instead, click Help > Use SOLIDWORKS Web Help.

To report problems encountered with the Web help interface and search, contact your local support representative. To provide feedback on individual help topics, use the “Feedback on this topic” link on the individual topic page.