|
;;;xdata
(defun c:tt(/ a data e fp sl ss str xx zb)
(setq a(& (桌面)"\\你微笑时很美.xls"))
(setq fp(open a"w"))
(setq ss(ssget'((0 . "insert")(-3("*")))))
(setq sl(sslength ss))
(repeat sl
(setq e(ssname ss(setq sl(1- sl))))
(setq xx(entget e '("*")))
(setq data(cadr(assoc -3 xx)))
(setq str(apply '& (mapcar ''((x)(& x " "))(adc data))))
(setq zb(& (rtos (cadr(assoc 10 xx))2 3)" "(rtos (caddr(assoc 10 xx))2 3)))
(write-line (& zb" "str)fp)
(grtext -1 (& "当前剩余:"(rtos sl 2 0))2)
)
(close fp)
(grtext -1 (&"你微笑时很美,共统计"(rtos(sslength ss)2 0)"个")2)
(command"shell"a)
)
(setq & strcat)
;;;桌面
(defun 桌面 ()
(vlax-invoke-method
(vlax-get-property (vlax-create-object "wscript.shell") 'SpecialFolders)
'Item
"desktop"))
;xwrite-line
(defun adc(lst)
(if (=(type(car lst))'STR)
(cons (CAR LST)(MAPCAR ''((X)(CDR X))(CDR LST)))
"adcSB"
)
)
|
|