linux1234 发表于 2008-4-5 17:07:00

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

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

兰州人 发表于 2008-4-6 21:39:00

<pre>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 "所有标注样式已统一风格" &amp; Chr(13) &amp; "谢谢使用!", vbInformation, "标注样式统一"
End Sub</pre><pre>你的程序是设置尺寸系统变量的设置问题.不知道在此循环的意思是什么?不明白.</pre><pre><font face="Verdana" size="2">图中的图元移动一点距离后,尺寸标注就会更新,这句话不明白??</font></pre><pre><font face="Verdana" size="2">图元移动一点距离后,尺寸标注就会更新,这是尺寸关联的问题.</font></pre><pre><font face="Verdana" size="2">图元中一条线移动x,y后,dimension相应的变化.</font></pre><pre><font face="Verdana" size="2">如果图中的图元移动一点距离后,尺寸标注就同时移动x,y.</font></pre>

linux1234 发表于 2008-4-7 08:20:00

版主,如果你看了我给你的dwg文件,估计就明白了,不移动的标注是不对的,移动后才会变成正确标注

linux1234 发表于 2008-4-7 13:10:00

难道就让这个问题沉底了吗?

kai 发表于 2013-4-20 16:58:00

重生成以下会不会解决?

火龙果2022 发表于 2022-2-19 08:49:42

只能移动解决吗?:sleepy:,请高手给出正确方法,谢谢!
页: [1]
查看完整版本: [求助]关于标注样式的更新