(tq ss (ssget ":S" '((0 . "LINE"))));只选取一次直线(省约回车)
(tq ss (ssget "X" '((0 . "LINE"))));自动选取直线,包含冻结的直线
(tq ss (ssget "A" '((0 . "LINE"))));自动选取直线,不包含冻结的直线
(tq ss (ssget '((1 . "*[0-9]*"))));只选取含数字的文本
(tq ss (ssget '((1 . "*#*")))) ;只选取含数字的文本
(tq ss (ssget '((0 . "TEXT") (1 . "~*[~`--9]*"))));只选取数字文本
(ssget '((0 . "TEXT")(-4 . ")(1 . "*[0-9]*")(-4 . "NOT>"));只选择不是数字的文字
(ssget '((0 . "TEXT")(1 . "~*#*")));只选择不是数字的文字
(tq ss (ssget '((0 . "TEXT")(1 . "#,1#,2#,3#,4#,50"))));选取1—50的数字文本
(SETQ SS (SSGET '((0 . "*text")(1 . "*(*,*)*,*(*,**)**"))));选取含括号的文本
(tq ss (ssget '((1 . "*[a-A-z-Z]*"))));只选取字母
(tq ss (ssget '((0 . "~inrt")))) ;选取不含块的对象
(SETQ ss (ssget (list '(0 . "CIRCLE")(cons 40 RR))));按半径的大小选取圆
(tq ss (ssget ":E:S" '((0 . "line"))));选取拾取框内的直线,选取不到就结束
(tq ss (ssget ":E" '((0 . "LINE"))));选取拾取框内的直线,选取不到就不结束,直到按右键
(tq ss (ssget ":N" '((0 . "LINE"))));只有通过窗口、窗交点拾取
(tq ss (ssget ":D" '((0 . "LINE"))));会累加选取的直线,同一条直线,选取两次个数就会乘以2,3次则3.....
(tq ss (ssget ":L" '((0 . "LINE"))));提示有几个在锁定图上,选取没有的锁定的直线
办英语四级成绩单
(tq ss (ssget "P" '((0 . "LINE"))));上次的选择集
(tq ss (ssget '((0 . "line")(8 . "~0"))));选取0层以外的线
(tq ss (ssget '((0 . "line")(8 . "~*[a-A-z-Z]*"))));选取图层名不含字母以外的线
(tq ss (ssget '((0."CIRCLE") (-3 ("APPNAME")))));选取带扩展数据的实体(圆)
;得到矩形p1 p2点框内的文字,包含在框内的被选取 相交的不选取,屏幕外的选取不到,WP点集
(tq ss(ssget "w" pt1 pt3 '((0 . "*text"))))
;得到矩形p1 p2点框内的文字,包含在框内的及和框相交的被选取,屏幕外的选取不到,CP点集
(tq ss(ssget "c" pt1 pt3 '((0 . "*text"))))
;线相交的线删除(屏幕外的选取不到郁闷所以要用zoom "ob")
(defun c:XX( / pt ptl ss)
(tq ptl nil)
(while (tq pt (getpoint))
(tq ptl (cons pt ptl))
)
(tq ss (ssget "f" ptl '((0 . "line"))))
(KX-E SS)
)
;选取图层表("CENTER" "DIM" "COOL" "CORE" -------N个图层)内的线
(tq la '("CENTER" "DIM" "COOL" "CORE")
ss (ssget (list '(0 . "LINE") (cons 8 (apply 'strcat (mapcar '(lambda (x) (strcat x ",")) la)))))
)
;选取经过某点的实体
(tq pt (getpoint))
(tq ss (ssget "C" pt pt))
;选取不含数字的文本
(tq ss (ssget '
((-4 . ")
(0 . "*TEXT")
(-4 . ")
(1 . "*[0-9]*")
(-4 . "NOT>")
(-4 . "AND>")
)
)
)
;只选取不含字母的文本
(tq ss (ssget '
((-4 . ")
(0 . "*TEXT")
(-4 . ")
(1 . "*[a-A-z-Z]*")
(-4 . "NOT>")
西安android培训(-4 . "AND>")
)
)
)
;-----
-------------------------------------------------------------------------------------------------------
;
"图层1" "图层2""图层n中的文本,图层1为层名
(SETQ SS (ssget "x"
(list
'(0 . "TEXT")
全国大学生英语竞赛(cons 8 "图层[1-n]")drill
)
)
)
;------------------------------------------------------------------------------------------------------------
;选取0层以外的线
(tq ss
(ssget '
((-4 . ")
(0 . "line")
(-4 . ")
(8 . "0")
(-4 . "NOT>")
(-4 . "AND>")
)
)
)
;------------------------------------------------------------------------------------------------------------
;
按颜色号选取对象
(tq col (KX-Int 7 "" "颜色号" col 1))
(tq SS (ssget
(list
'(-4 . ")
(cons 62 COL)
'(-4 . "OR>")sleigh
)
)
)
;-----------------------------------------------------------------------------------------------------------
;
选取含KX的文本
(tq XT (strcat "*" "KX" "*"));KX为文字内容
(ssget (list
'(0 . "text")
(cons 1 XT)
)
)
;-----------------------------------------------------------------------------------------------------------
;判断选取某个区域有没有直线
(tq SS (ssget "c"
(polar '(0 0) (* 0.25 pi) 0.5);坐标点
(polar '(0 0) (* 1.25 pi) 0.5);坐标点
'((0 . "LINE"))
)
exceedingly
)
;-----------------------------------------------------------------------------------------------------------
;选取颜色不是随层的圆、直线
(tq SS (ssget "X"
'((0 . "CIRCLE,LINE")
(-4 . "/=")(62 . 256);-4 62"面不可以加AND OR
)
)
)
;------------------------------------------------------------------------------------------------------------
;选取颜色1和2的对象(OR)的用法
(tq ss (ssget '((-4 . ")
(62 . 2)
(62 . 1)
(-4 . "or>")
)
)
四六级作弊
)
;--------------------------------------------------------------------------------------------------------------
;选取半径大于20小于100的圆
(tq ss (ssget '
((-4 . ")
(0 . "circle")
(-4 . ">")(40 . 20);大于20
(-4 . "<")(40 . 100);小于100
(-4 . "and>")
)
)
)
;--------------------------------------------------------------------------------------------------------------
;只选取"文字(包括多行文字)、尺寸、带属性的块
(tq ss (SSGET '
((-4 . ")
(0 . "*TEXT,DIMENSION")
(-4 . ")
(0 . "INSERT")
(66 . 1)
amina
(-4 . "AND>")
(-4 . "OR>")
)
)
)
;
--------------------------------------------------------------------------------------------------------------
;屏幕外的窗口模式选取
(tq rec_p1 '(0 0)) ;窗口左下角点
(tq rec_p2 '(1000 1000)) ;窗口右上角点
(tq filter_list
(list
'(0 . "inrt")
'(-4 . ")
'(-4 . ">,>,*") (cons 10 rec_p1)
'(-4 . "<,<,*") (cons 10 rec_p2)
'(-4 . "and>")
)
)
(ssget "x" filter_list)
;--------------------------------------------------------------------------------------------------------------
;---------------------------------------------------------------------------------------------------------
-----
;一次产生n个不同选取集
(if (tq ss (ssget)) (tq ss1 (ssget "_p" '((0 . "*TEXT")))));从选择集中分解出文字
;空回车得出不同结果的选取集
(if (tq ss (ssget))
(tq ss (ssget "_p" flt))
(tq ss (ssget "_x" flt))
phenomenon的复数)
;--------------------------------------------------------------------------------------------------------------
;;;坐标范围选择,有点类似(ssget "c" p1 p2 filter),但本函数在屏幕外的也可选择
;;;测试 (tt (getpoint) (getpoint) '((0 . "inrt")))
(defun tt (p1 p2 filter / minX minY maxX maxY)
(tq minX (min (car p1) (car p2))
minY (min (cadr p1) (cadr p2))
maxX (max (car p1) (car p2))
maxY (max (cadr p1) (cadr p2))
)
(if filter
(ssget "x"
(append (list '(-4 . ")
iton'(-4 . ">=,>=,*")
(list 10 minX minY 0)
'(-4 . "<=,<=,*")
(list 10 maxX maxY 0)
)
(append filter '((-4 . "and>")))
)
)
(ssget "X"
(list '(-4 . ")
'(-4 . ">=,>=,*")
(list 10 minX minY 0)
'(-4 . "<=,<=,*")
(list 10 maxX maxY 0)
'(-4 . "and>")