明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2230|回复: 5

[求助]关于标注样式的更新

[复制链接]
发表于 2008-4-5 17:07:00 | 显示全部楼层 |阅读模式

我做了VBA程序改变标注样式的内容(比例因子,标注比例等),改变后,图形不会自动更新,必须我用move,移动一个距离才行,请求帮助!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
发表于 2008-4-6 21:39:00 | 显示全部楼层
Private Sub tybzys()
    Dim i As Integer
    Dim uudimStyle As AcadDimStyle
    For i = 0 To (ThisDrawing.DimStyles.Count - 1)
        ThisDrawing.ActiveDimStyle = ThisDrawing.DimStyles(i)
        Set uudimStyle = ThisDrawing.ActiveDimStyle
        ThisDrawing.SetVariable "DIMADEC", 2
        ThisDrawing.SetVariable "DIMALTU", 2
        ThisDrawing.SetVariable "DIMALTZ", 8
        ThisDrawing.SetVariable "DIMASZ", 3#
        ThisDrawing.SetVariable "DIMATFIT", 1
        ThisDrawing.SetVariable "DIMAUNIT", 1
        ThisDrawing.SetVariable "DIMAZIN", 2
        ThisDrawing.SetVariable "DIMCEN", 0#
        ThisDrawing.SetVariable "DIMDEC", 2
        ThisDrawing.SetVariable "DIMDLI", 0.5
        ThisDrawing.SetVariable "DIMEXE", 1#
        ThisDrawing.SetVariable "DIMEXO", 0.5
        ThisDrawing.SetVariable "DIMGAP", 1#
        ThisDrawing.SetVariable "DIMLFAC", 2
        ThisDrawing.SetVariable "DIMLUNIT", 2
        ThisDrawing.SetVariable "DIMRND", 0#
        ThisDrawing.SetVariable "DIMSCALE", 2
        ThisDrawing.SetVariable "DIMTAD", 1
        ThisDrawing.SetVariable "DIMTFAC", 0.8
        ThisDrawing.SetVariable "DIMTIH", 0#
        ThisDrawing.SetVariable "DIMTIX", 1
        ThisDrawing.SetVariable "DIMTMOVE", 0
        ThisDrawing.SetVariable "DIMTOFL", 1
        ThisDrawing.SetVariable "DIMTOH", 0#
        ThisDrawing.SetVariable "DIMTOLJ", 1
        ThisDrawing.SetVariable "DIMTXSTY", ThisDrawing.ActiveTextStyle.Name
        ThisDrawing.SetVariable "DIMTXT", 3.5
        ThisDrawing.SetVariable "DIMTZIN", 8
        ThisDrawing.SetVariable "DIMUPT", 1
        ThisDrawing.SetVariable "DIMZIN", 8
        uudimStyle.CopyFrom ThisDrawing
    Next i
    ThisDrawing.SendCommand ("regen ")
    MsgBox "所有标注样式已统一风格" & Chr(13) & "谢谢使用!", vbInformation, "标注样式统一"
End Sub
你的程序是设置尺寸系统变量的设置问题.不知道在此循环的意思是什么?不明白.
图中的图元移动一点距离后,尺寸标注就会更新,这句话不明白??
图元移动一点距离后,尺寸标注就会更新,这是尺寸关联的问题.
图元中一条线移动x,y后,dimension相应的变化.
如果图中的图元移动一点距离后,尺寸标注就同时移动x,y.
 楼主| 发表于 2008-4-7 08:20:00 | 显示全部楼层
版主,如果你看了我给你的dwg文件,估计就明白了,不移动的标注是不对的,移动后才会变成正确标注
 楼主| 发表于 2008-4-7 13:10:00 | 显示全部楼层
难道就让这个问题沉底了吗?
发表于 2013-4-20 16:58:00 | 显示全部楼层
重生成以下会不会解决?
发表于 2022-2-19 08:49:42 | 显示全部楼层
只能移动解决吗?,请高手给出正确方法,谢谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-25 02:54 , Processed in 0.173663 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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