明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: tjuzkj

标注随层,该怎么编写?

  [复制链接]
发表于 2012-4-28 18:50:01 来自手机 | 显示全部楼层
亦在求解。
发表于 2012-4-28 19:12:32 | 显示全部楼层
本帖最后由 caoyin 于 2012-4-28 19:13 编辑

(setq EN (entsel "\n选择标注对象: ")
        OBJ (vlax-ename->vla-object(car EN))
)
(vla-put-dimensionlineColor OBJ 256)
(vla-put-extensionlineColor OBJ 256)
(vla-put-textColor OBJ 256)
发表于 2012-4-30 11:52:26 | 显示全部楼层
本帖最后由 smartstar 于 2012-4-30 17:41 编辑

;;标注随层
(defun c:sc ()
  (setq ss (ssget '((0 . "DIMENSION"))))
  (setq n 0)
  (repeat (sslength ss)
    (setq EN  (cdr (assoc -1 (entget (ssname ss n)))))
    (setq OBJ (vlax-ename->vla-object  EN))
(princ en)
    (vla-put-dimensionlineColor OBJ 256)
    (vla-put-extensionlineColor OBJ 256)
    (vla-put-textColor OBJ 256)
    (setq n (1+ n))
  )
  (princ)
)
发表于 2012-4-30 12:03:14 | 显示全部楼层
MaKaiJin 发表于 2011-11-8 08:45
(setq ss (ssget "X" '((0 . "DIMENSION"))))
(command "Chprop" ss "" "LA" "标注层" "")

(defun c:dimoe()
(command "_dimordinate" pause pause)
(setq ss (ssget "X" '((0 . "DIMENSION"))))
(command "Chprop" ss "" "LA" "标注层" "")
)
这个可以行
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-8 15:23 , Processed in 0.130336 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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