明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 587|回复: 3

[源码] 求大神指点左键线型标注结束,右键启动连续标注

[复制链接]
发表于 2020-9-2 09:08 | 显示全部楼层 |阅读模式
(defun c:da(/ oldlay)
(setq oldlay (getvar"clayer"))
(if (= nil (tblsearch"layer" "dim"))
(command "layer" "n" "dim" "c" "4" "dim" "l" "continuous" "dim" "")  
)
(setvar "clayer" "dim")
                (command "dimtoh"   "off"  )  ;非半径标注---------------------------------------------------
(princ"\n请选择标注点:")
(command "dimlinear" )      ;发出标注命令
(while (> (getvar "CMDACTIVE") 0) (command PAUSE));等待前一命令完成
                (command "_dimcontinue")                ;-------------------------------------------------------2020-08-31增加连续标注
                (while (> (getvar "CMDACTIVE") 0) (command PAUSE)); ;------------------------------------2020-08-31增加连续标注
(princ)
)


发表于 2020-9-2 14:25 | 显示全部楼层
(defun c:da(/ oldlay)
  (setq oldlay (getvar "clayer"))
  (command "-layer" "m" "dim" "c" "4" "" "l" "continuous" "" "")
  (command "dimtoh" "off")  ;非半径标注
  (princ "\n请选择标注点:")
  (command "dimlinear")     ;发出标注命令
  (while (> (getvar "CMDACTIVE") 0) (command PAUSE)) ;等待前一命令完成
  (if (/= (getpoint "\n右键连续标注: ") nil) (progn
    (command "_dimcontinue") ;2020-08-31增加连续标注
    (while (> (getvar "CMDACTIVE") 0) (command PAUSE))
  ))
  (setvar "CLAYER" oldlay)
  (princ)
)
(princ)

评分

参与人数 1明经币 +1 收起 理由
wuzheng80425 + 1

查看全部评分

回复 支持 1 反对 0

使用道具 举报

 楼主| 发表于 2020-9-2 21:27 | 显示全部楼层
ZZXXQQ 发表于 2020-9-2 14:25
(defun c:da(/ oldlay)
  (setq oldlay (getvar "clayer"))
  (command "-layer" "m" "dim" "c" "4" "" " ...

谢谢版主,学习了,反观自己,看来还是自己的基础没打好
发表于 2020-9-3 20:41 | 显示全部楼层
支持支持,,,学习学习
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-2 19:04 , Processed in 0.353539 second(s), 29 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表