- (defun c:gd991 (/ gd k xgd xzb ygd yzb zbd)
- (if (null (tblsearch "layer" "拐点坐标"))
- (entmake (list '(0 . "LAYER")'(100 . "AcDbSymbolTableRecord")'(100 . "AcDbLayerTableRecord")(cons 2 "拐点坐标")(cons 62 7)'(70 . 0)'(6 . "CONTINUOUS")))
- )
- (setq k (getint "\n请输入编号<1>:"))
- (if (= k nil) (setq k 1))
- (while (setq zbd (getpoint "\n请点击范围拐点:"))
- (setq xzb (rtos (nth 1 zbd) 2 3))
- (setq yzb (rtos (nth 0 zbd) 2 3))
- (entmake(list '(0 . "text")(cons 8 "拐点坐标")'(50 . 0.0)(cons 10 zbd)(cons 11 zbd)(cons 1 (itoa k));|'(7 . "宋体")|;(cons 40 1)'(6 . "Continuous")'(41 . 0.8)'(72 . 0)'(210 0.0 0.0 1.0)'(100 . "AcDbText")'(73 . 0)))
- (setq gd (getpoint "\n标注坐标点位置:"))
- (setq xgd (rtos (nth 1 gd) 2 3))
- (setq ygd (rtos (nth 0 gd) 2 3))
- (entmake(list '(0 . "text")(cons 8 "拐点坐标")'(50 . 0.0)(cons 10 gd)(cons 11 gd)(cons 1 (strcat (itoa k) ":" "X:" xzb "," "Y:" yzb));|'(7 . "宋体")|;(cons 40 1)'(6 . "Continuous")'(41 . 0.8)'(72 . 0)'(210 0.0 0.0 1.0)'(100 . "AcDbText")'(73 . 0)))
- (setq k (1+ k))
- )
- (princ)
- )
|