chef 发表于 2005-12-13 19:50:00

求助!怎么样设置标注样式的比例?

<P>&nbsp;图形中有 "STANDARD","CAD"....的标注样式,我想设置他们标注比例,以及其它属性,用VBA怎么实现.</P>
<P>下面是我做的对 "STANDARD" 比例的修改,可以运行后,出现一个对应的,"样式替代"</P>
<P>Dim adDimStyle As AcadDimStyle<BR>&nbsp; For Each adDimStyle In ThisDrawing.DimStyles<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; If adDimStyle.Name = "STANDARD" Then<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ThisDrawing.ActiveDimStyle = adDimStyle<BR>&nbsp;&nbsp;&nbsp; End If<BR>&nbsp; Next<BR>&nbsp; With ThisDrawing<BR>&nbsp;&nbsp;&nbsp; .SetVariable "DimScale", 96&nbsp;&nbsp;&nbsp; </P>
<P>&nbsp; End With<BR><BR><BR><BR></P>

wyj7485 发表于 2005-12-14 09:14:00

<P>把With ThisDrawing<BR>&nbsp;&nbsp;&nbsp; .SetVariable "DimScale", 96&nbsp;&nbsp;&nbsp; </P>
<P>&nbsp; End With</P>
<P>换为:<BR></P>
<P>ThisDrawing.SetVariable "DIMSCALE", 96<BR>ThisDrawing.DimStyles.Item("Sca96"Delete<BR>Set NewTxtStyle = ThisDrawing.DimStyles.Add( "Sca96")<BR>NewTxtStyle.CopyFrom ThisDrawing</P>
页: [1]
查看完整版本: 求助!怎么样设置标注样式的比例?