做块的方式>>预览插入文字, 有更好的思路吗????
本帖最后由 yanshengjiang 于 2021-12-31 02:23 编辑(defun c:sn ()
(south-wzzj "DMTZ" "水泥" "200009" "地貌注记" "sn")
)
(defun south-wzzj (la wenzi bianma shuoming mingling / h);;; (vl-catch-all-apply
;;; '(lambda()
(princ (strcat shuoming ">>>" wenzi))
(if (null (tblsearch "APPID" "SOUTH"))
(progn
(regapp "SOUTH")
)
)
(if (and
(null (ssget "x" '((2 . "gc00"))))
(tblobjname "BLOCK" "gc00")
)
(vl-cmdf "purge" "b" "gc00" "y" "y")
)
(setvar "cmdecho" 0)
(if (/= 0 (getvar 'userr1))
(setq h (* (getvar 'userr1) 0.003))
(setq h 1.5)
)
(if (null (tblobjname "BLOCK" "gc00"))
(progn
(entmake '((0 . "BLOCK") (2 . "gc00")
(70 . 0)
(10 0 0 0)
)
)
(entmake (list '(0 . "TEXT") '(100 . "AcDbText") '(10 0 0 0)
(cons '40 h) (cons '1 wenzi) (cons 8 la) '(41 . 0.8) '
(7 . "hz") '(11 0 0 0) '(11 0 0 0) '(72 . 1) '
(73 . 2) (list -3 (list "SOUTH" (cons 1000 bianma)))
)
)
(entmake '((0 . "ENDBLK")))
)
)
(vl-cmdf "insert" "gc00" pause "1" "1" "0")
(if (= "gc00" (cdr (assoc 2 (entget (entlast)))))
(progn
(vl-cmdf "_explode" (entlast))
(vlax-invoke-method (vlax-get-or-create-object "WScript.Shell")
'sendkeys (strcat mingling "{Enter}")
)
)
);;; ))
(prin1)
)
1)grread + entmake
2)entmake + move 块里面就一个文字,还插入就炸开,做块的意义何在? kozmosovia 发表于 2024-10-3 09:36
块里面就一个文字,还插入就炸开,做块的意义何在?
预览+捕捉,。但效果不好。
页:
[1]