|  ;;;制作命名为HG1.dwg的图存入支持搜索文件路径内,加入下面两行代码(如果块HG1未定义的话):
;;(command "INSERT" "HG1" '(0 0 0) 1 1 0)(command "erase" (entlast) "")试试看。
(defun C:aa (/ pt1 pt2)
   (command "INSERT" "HG1" '(0 0 0) 1 1 0)
    (command "erase" (entlast) "")
  (setq pt1 (getpoint "\n指定第一点:"))
  (entmake (list '(0 . "INSERT") (cons 2 "hg1") (cons 10 pt1)))
  (while (setq pt2 (getpoint pt1 "\n指定下一点:"))
    (entmake (list '(0 . "LINE") (cons 10 pt1) (cons 11 pt2)))
    (entmake (list '(0 . "INSERT") (cons 2 "hg1") (cons 10 pt2)))
    (setq pt1 pt2)
  )
  (princ)
)
 |