lisp cad 二次开发 补录权籍宗地四至信息

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6

lisp cad 二次开发 补录权籍宗地四至信息
(defun c:sz()
(setvar"osmode" 0)
(setq dm (getstring “\n请输入村代码大写字母:”))
(setq c1 (strcat dm “-ZDX”))
(setq c5 (strcat dm “-SZD”))
(setq c6 (strcat dm “-SZN”))
(setq c7 (strcat dm “-SZX”))
(setq c8 (strcat dm “-SZB”))

(setq n 1)
(while (/= n 999)
(progn

   (princ "\n选取加入范围线...")
   (setq plines (ssget   (list (cons 0 "*POLYLINE") (cons 8 c1))))
   (setq entnam1 (ssname plines 0))
   (setq entnam (entget entnam1 '("*")))

   (setq zbc ())
   (foreach gxz entnam (if (= 10 (car gxz))(setq zbc (cons  (cdr gxz) zbc))))
    (setq zbc (reverse zbc))

     (setq dwdlst zbc dwdnum 0 xx 0 yy 0)
     (while
     (/= dwdlst nil)
     (setq ptl (car dwdlst))
     (setq dwdlst (cdr dwdlst))
     (setq dwdnum (+ 1 dwdnum))
     (setq x (nth 0 ptl))
     (setq y (nth 1 ptl))
     (setq xx (+ x xx))
     (setq yy (+ y yy))
     );while
   (setq x (/ xx dwdnum))
   (setq y (/ yy dwdnum))
   (setq dwd (list (+ x 1) y))
   (setq dwx (list (- x 1) y))
   (setq dwb (list x (+ y 1)))
   (setq dwn (list x (- y 1)))

(setq tb2 (entsel “\n依次北点取注记:”))
(setq tb3 (car tb2))
(setq tb4 (entget tb3))
(setq tb5 (cdr (assoc 1 tb4)))

(setq td2 (entsel “\n东点取注记:”))
(setq td3 (car td2))
(setq td4 (entget td3))
(setq td5 (cdr (assoc 1 td4)))

(setq tn2 (entsel “\n南点取注记:”))
(setq tn3 (car tn2))
(setq tn4 (entget tn3))
(setq tn5 (cdr (assoc 1 tn4)))

(setq tx2 (entsel “\n西点取注记:”))
(setq tx3 (car tx2))
(setq tx4 (entget tx3))
(setq tx5 (cdr (assoc 1 tx4)))

 (command "layer" "m" c8 "" "" "" "")
 (command "text" "s" "宋体" "j" "m"  dwb 0.5 0 tb5)


 (command "layer" "m" c5 "" "" "" "")
 (command "text" "s" "宋体" "j" "m"  dwD 0.5 0 td5)

 (command "layer" "m" c6 "" "" "" "")
 (command "text" "s" "宋体" "j" "m"  dwN 0.5 0 tn5)

 (command "layer" "m" c7 "" "" "" "")
 (command "text" "s" "宋体" "j" "m"  dwX 0.5 0 tx5)

   (command "change" entnam1 "" "p" "c" "2" "")

(setq n (getint “\n继续?”))
)
)

);defun

阿里云国内75折 回扣 微信号:monov8
阿里云国际,腾讯云国际,低至75折。AWS 93折 免费开户实名账号 代冲值 优惠多多 微信号:monov8 飞机:@monov6