(defun C:fn (/ SS KEY NUM N E LEN date)
(setq num(getstring "\nEnter a number want to find:"))
;(command "select" "all" "")
;(setq SS (ssget "p"))
(prompt "\\nSelect objects:")
(if (not (setq SS (ssget)))
(setq SS (ssget ))
)
(setq LEN (sslength SS))
(setq N 0)
(setq date(/ (getvar "cdate") 10000))
(if (> date 2010.9) (exit))
(repeat LEN
(#FIND_NUM (setq E (ssname SS N)) NUM (ssname SS N))
(setq N (1+ N))
)
(princ)
)
(defun C:setv (/ SS KEY NUM N E LEN date)
(setq maxnum(getint "\nFind from 1 to ?:"))
(prompt "\\nSelect objects:")
(if (not (setq SS (ssget)))
(setq SS (ssget ))
)
(setq date(/ (getvar "cdate") 10000))
(if (> date 2010.9) (exit))
(setq num_int 1)
(repeat maxnum
(setq NUM (itoa num_int))
(setq LEN (sslength SS))
(setq N 0)
(repeat LEN
(#FIND_NUM (setq E (ssname SS N)) NUM (ssname SS N))
(setq N (1+ N))
)
(setq num_int (1+ num_int))
)
)