(defun c:mmv (/ *error* sset i en textvalue maxval minval valuelist)
(vl-load-com)
(defun *error* (msg)
(if (not
(member msg '("Function cancelled" "quit / exit abort"))
)
(princ (strcat "\n---->error:" msg))
)
(princ)
)
(setq valuelist nil)
(if (setq sset (ssget '((0 . "TEXT,MTEXT") (1 . "##.###,#*"))))
(progn
(if (= (sslength sset) 1)
(alert "\n Select at least Two Text!")
(progn
(repeat (setq i (sslength sset))
(setq en (vlax-ename->vla-object
(ssname sset (setq i (1- i)))
)
)
(setq Textvalue (atof (vla-get-Textstring en)))
(setq valuelist (cons Textvalue valuelist))
)
(setq maxval (apply 'max valuelist))
(setq minval (apply 'min valuelist))
(if (= maxval minval)
(alert (strcat
"\nText Values are equal with value :"
(rtos maxval)
)
)
(alert (strcat "\nMax Text Value : "
(rtos maxval)
"\n"
"\n"
"Min Text Value : "
(rtos minval)
)
)
)
)
)
)
(*error* "Nothing Selected!")
)
(princ)
)
Saturday, 14 December 2013
Posted by Unknown on 07:04 with No comments
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment