本来上传了的,现在写在下面,帮忙看下:),主程序是findline
(defun ptinpl (ename n) (setq ent (entget ename)) (setq i (+ 14 (* (- n 1) 4))) (cdr (nth i ent)) ;(list (nth (* n 2) plist)(nth (1+ (* n 2)) plist)) )
(defun ptnofpl(ename) (setq ent (entget ename)) (/ (- (length ent) 15) 4) )
(defun itemexist(mlist item / bu len i) (setq bu nil) (setq len (length mlist) i (- len 1)) (while (>= i 0) (if (= (nth i mlist) item) (setq bu t i 0)) (setq i (- i 1)) ) bu )