![]() |
[原创]点击圆存坐标并编号可以加前缀
[原创]点击圆存坐标并编号可以加前缀
www.dimcax.com [原创]点击圆存坐标并编号可以加前缀 defun c:hk() (command "cmdecho" "0") (command "layer" "m" "hk" "c" "1" "" "") (setq f (open (getfiled "坐标文件保存到" "c:" "txt" 1) "w")) (setq jj (strcase (getstring"请输入前缀:"))) (setq n 1) (while (setq na (entsel"\n注意必须要点击编号的圆 有问题发邮件到:")) (setq xy (cdr (assoc 10 (entget (car na))))) (setq x (nth 0 xy)) (setq y (nth 1 xy)) (setq zg (* 3 (cdr (assoc 40 (entget (car na)))))) (setq yy (+ y zg)) (setq zb (list x yy)) (setq kk (rtos n 2 0)) (setq k (strcat jj kk)) (command "layer" "s" "hk" "") (command "text" "j" "m" zb zg "0" k "") (setq ss (strcat k "," (rtos (nth 0 xy) 2 3) "," (rtos (nth 1 xy) 2 3))) (write-line ss f) (setq n (1+ n)) (princ ss) (princ) ) ) 通过工具菜单->加载应用程序 可加载该程序,然后可直接在命令行输入相关命令运行。如需要每次启动时均加载该程序,则可以将该文件放在启动组中。 文件预览: d |
| 所有的时间均为北京时间。 现在的时间是 02:44 AM. |