乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 38|回复: 2

[综合讨论] dimstyle误差减少

[复制链接]

11

主题

89

帖子

5

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
133
发表于 2009-1-2 14:16:49 | 显示全部楼层 |阅读模式
我四处寻找解决方案,以解决客户的一些奇怪物品。
有没有见过一个客户创建超过30个不同的dimstyles,这些dimstyles都完全相同,但在不同的层上?
无论如何,我希望减少或选择它们都设置为一种样式,以便我可以清除垃圾。
你们有没有人在事后找到解决这个问题的方法?
这是一个指向反应堆的链接,以帮助先发制人地执行某些标准
http://autocadder.blogspot.com/2008_12_01_archive.html。

本帖以下内容被隐藏保护;需要你回复后,才能看到!

游客,如果您要查看本帖隐藏内容请回复
回复

使用道具 举报

0

主题

1

帖子

1

银币

初来乍到

Rank: 1

铜币
1
发表于 2010-2-21 01:34:25 | 显示全部楼层
你有没有弄清楚这个?
回复

使用道具 举报

11

主题

89

帖子

5

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
133
发表于 2010-3-17 14:08:40 | 显示全部楼层
到目前为止,卡布和特里向我指出了几个:
  1. ; create a list of current dimstyles in the drawing
  2. ; get total count/ give each one a number
  3. ; if count is greater than zero While (> count 0) ; continue with next DimStyle.
  4. ; set the dimstyle current
  5. ; change the necessary variables
  6. ; save the variables to the current dimstyle
  7. ; count down by one after saving that dimstyle
  8. ; DimStyle Update Complete.
  9. ;(defun SaveDimStyleChanges (style /)
  10. ;  (vla-copyfrom
  11. ;    (vlax-ename->vla-object (tblobjname "DIMSTYLE" style))
  12. ;    (vla-get-activedocument (vlax-get-acad-object))
  13. ;  )
  14. ;)
  15. ; Posted by Terry CADD on AUGI Forums 2008-4-23
  16. ; http://forums.augi.com/showthread.php?p=967708#post967708
  17. (defun c:DCBL (/ DimStyles@ StyleName$)
  18. (princ "\nDimstyles color bylayer")
  19. ;===========================================================================Turn off command line responses
  20. (command "CMDECHO" 0)        ;DO NOT CHANGE THIS LINE
  21. ;===========================================================================
  22.         (setq StyleName$ (cdr (assoc 2 (tblnext "DIMSTYLE" t))))
  23.         (setq DimStyles@ (list StyleName$))
  24.         (setq Count 0)
  25.        
  26.         (while (setq StyleName$ (cdr (assoc 2 (tblnext "DIMSTYLE"))))
  27.                 (setq DimStyles@ (append DimStyles@ (list StyleName$)))
  28.         )                ;end while
  29.        
  30.         (foreach StyleName$ DimStyles@
  31.                 (command "DIMSTYLE" "R" StyleName$)
  32.                 (setvar "DIMCLRD" 256)                                        ;Dimension line and leader color
  33.                 (setvar "DIMCLRE" 256)                                        ;Extension line color
  34.                 (setvar "DIMCLRT" 256)                                        ;Dimension text color
  35.                 (command "DIMSTYLE" "S" StyleName$ "Y")
  36.                 (setq Count (+ 1 Count))
  37.                 (princ "\n Count = [ ")
  38.                 (princ Count)
  39.                 (princ " ] picking next DimStyle.....")
  40.         )                ;foreach
  41. (princ)
  42. ;===========================================================================Turn off command line responses
  43. (command "CMDECHO" 1)        ;DO NOT CHANGE THIS LINE
  44. ;===========================================================================
  45. )                        ;defun
  1. ;;  Another way without the Command.
  2. ;;  DimStyle to By Layer
  3. ;;  CAB 04/28/09
  4. (defun c:DS2BL (/ acdoc dsobj obj)
  5.   (setq acdoc (vla-get-activedocument (vlax-get-acad-object)))
  6.   (setq dsobj (vla-get-dimstyles acdoc))
  7.   (vlax-for obj dsobj
  8.     (vla-put-activedimstyle acdoc (vla-item dsobj (vla-get-name obj))) ;set dimstyle current
  9.     (vlax-invoke acdoc 'setvariable "DimCLRD" 256) ;Dimension line and leader color
  10.     (vlax-invoke acdoc 'setvariable "DimCLRE" 256) ;Extension line color
  11.     (vlax-invoke acdoc 'setvariable "DimCLRT" 256) ;Dimension text color
  12.     (vla-copyfrom obj acdoc) ; update the Dim Style
  13.   )
  14.   (princ)
  15. )
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-12 19:38 , Processed in 0.453437 second(s), 58 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表