明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

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

[已解答] 如何获得标注对像的精度? 我查看了标注对像定义数据,没有找到控制其精度的组码。

[复制链接]
 楼主| 发表于 2016-4-12 16:20:56 | 显示全部楼层
本帖最后由 clh521 于 2016-4-12 16:24 编辑

终于zml84的博客找到了,谢谢自贡黄明儒zml84;本人将程序改为函数如下:

;;;功能:尝试获取    标注尺寸的小数位数http://zml84.blog.sohu.com/251579063.html
;;;日期:zml84 于 2013-01-08
;;例:(setq en (car (entsel)))
;;(dimdigits en)
(defun dimdigits (en / en ent tmp str)
  (if (and en
           (setq ent (entget en '("ACAD"))
           )
      )
    (cond
      ;;
      ((and
         (setq tmp (cadr (assoc -3 ent)))
         (setq tmp (member (cons 1070 271) tmp))
       )
       (cdadr tmp)
      )
      ;;
      ((and (setq str (cdr (assoc 3 ent)))
            (setq tmp (tblsearch "DIMstyle" str))
       )
       (cdr (assoc 271 tmp))
      )
      ;;
      ((member '(0 . "DIMENSION") ent)
       (getvar "DIMDEC")
      )
      ;;
      (t nil)
    )
  )
)
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-5-20 10:45 , Processed in 0.157756 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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