本帖最后由 Gu_xl 于 2011-2-13 14:05 编辑
- (defun c:tt ( / dctl tmp len ename enl ss)
- (setq GrpName "PC_PAPER_DIC")
- (setq ss (ssadd))
- (setq
- dctl (dictsearch (namedobjdict) "ACAD_GROUP")
- ename nil
- )
- (if dctl
- (progn
- (setq
- len (length dctl)
- tmp (member (cons 3 (strcase GrpName)) dctl)
- )
- (if tmp
- (setq ename (cdr (nth (1+ (- len (length tmp))) dctl)))
- )
- ))
- (if ename
- (progn
- (setq enl (entget ename))
- (foreach a enl
- (if (= 340 (car a))
- (ssadd (cdr a) ss)
- )
- )
- ss
- )
- )
- )
|