;;;获取(defun SS-TEXT-GETREAL (/ SS LST I) (if (setq SS (ssget '((0 . "*TEXT") (1 . "~*[~`--9]*")))) (progn (setq LST '() I 0 ) (repeat (sslength SS
( defun SS-TEXT-GETREAL ( / SS LST I )
( if ( setq SS ( ssget ' ( ( 0 . "*TEXT" ) ( 1 . "~*[~`--9]*" ) ) ) )
( progn
( setq LST ' ( )
I 0
)
( repeat ( sslength SS )
( setq LST ( cons ( read ( cdr
( assoc 1 ( entget ( ssname SS I ) ) )
)
)
LST
)
)
( setq I ( 1+ I ) )
)
( reverse LST )
)
)
)
( defun C:++ ( )
( princ ( rtos ( apply ' + ( SS-TEXT-GETREAL ) ) 2 10 ) )
( princ )
)
( defun C:-- ( )
( princ ( rtos ( apply ' - ( SS-TEXT-GETREAL ) ) 2 10 ) )
( princ )
)
( defun C:** ( )
( princ ( rtos ( apply ' * ( SS-TEXT-GETREAL ) ) 2 10 ) )
( princ )
)
( defun C:// ( )
( princ ( rtos ( apply ' / ( SS-TEXT-GETREAL ) ) 2 10 ) )
( princ )
)
[ 本帖最后由 zml1984 于 2009-9-6 15:42 编辑 ]