我将选择一条三维多段线。
- (defun c:coord ( / e r)
- (prompt "\nchoose a onject!")
- (setq e (entget (car (entsel))))
- (setq r 1)
- (setq count 0)
- (while r
- (setq e (entget (entnext (cdr (car e)))))
-
- (if (/= (cdr (assoc 0 e)) "SEQEND")
-
- (progn
-
- (terpri)
-
- (princ (cdr (assoc 10 e)))
- ;print the co-ordinates
- (setq count(1+ count))
- )
- (setq r nil)
-
- )
- )
- (prompt "\nThere are total " );In here how to print "There are total (count ;number) vertexes in this object."
- (princ)
- );defun
- (princ)
我表达清楚吗??我想把变量“count”放在提示符中,例如,我得到的计数等于4,我想做的是在屏幕上打印:“这个对象中总共有4个顶点。“有可能吗?谢谢。 |