dongfang_t 发表于 2006-7-19 10:01:00

[求助]尺寸标注

<P>线性标注中,怎样标注实际尺寸,而不管图中比例大小,图中显示的是想要标注的尺寸?&nbsp;&nbsp;&nbsp;用AddDimAligned方法只能标注当前图上的两点长度,请问有没有别的方法</P>

dongfang_t 发表于 2006-7-19 11:25:00

<P>如果用 dimObj.TextOverride可以修改,不过公差标注不上,请问怎么解决?</P>
<P>Dim xxbzObj As AcadDimAligned<BR>&nbsp;&nbsp;&nbsp; Dim point1(0 To 2) As Double<BR>&nbsp;&nbsp;&nbsp; Dim point2(0 To 2) As Double<BR>&nbsp;&nbsp;&nbsp; Dim location(0 To 2) As Double<BR>&nbsp;&nbsp;&nbsp; point1(0) = 100: point1(1) = 184.96: point1(2) = 0<BR>&nbsp;&nbsp;&nbsp; point2(0) = 350: point2(1) = 184.96: point2(2) = 0<BR>&nbsp;&nbsp;&nbsp; location(0) = 225: location(1) = 200: location(2) = 0<BR>&nbsp;&nbsp;&nbsp; Set xxbzObj = ThisDrawing.ModelSpace.AddDimAligned(point1, point2, location)<BR>&nbsp;&nbsp;&nbsp; <BR>&nbsp;&nbsp;&nbsp; xxbzObj.ToleranceDisplay = acTolSymmetrical<BR>&nbsp;&nbsp;&nbsp; ThisDrawing.Application.ZoomAll<BR>&nbsp;&nbsp;&nbsp; xxbzObj.ToleranceLowerLimit = 0.15<BR>&nbsp;&nbsp;&nbsp; xxbzObj.ToleranceUpperLimit = 0.05<BR>&nbsp;&nbsp;&nbsp; xxbzObj.TextOverride = "{\Fgdt;n}500"<BR>&nbsp;&nbsp;&nbsp; ThisDrawing.Regen acAllViewports</P>
<P>这是程序,运行结果只有直径500,没有上下偏差,如何解决?<BR></P>

wyj7485 发表于 2006-7-19 11:37:00

加入标注线性比例

dongfang_t 发表于 2006-7-19 11:45:00

是dimObj.LinearScaleFactor 吗?

dongfang_t 发表于 2006-7-19 13:45:00

急待解决,希望大家帮忙

wyj7485 发表于 2006-7-19 17:02:00

dimlfac

dongfang_t 发表于 2006-7-19 17:25:00

<P>谢谢这位学长,我初学VBA,所以什么都不懂</P>
<P>对了,dimlfac怎么用?&nbsp;&nbsp; &nbsp;这样dimobj.dimlfac吗?怎么不对</P>
<P>请明示</P>

wyj7485 发表于 2006-7-19 17:49:00

dimlfac 是cad的系统变量,对于dimobj没有这个属性,可以用textoverride属性固定尺寸,要加上下公差可以按如下格式添加:10\H0.5x\S+0.2^-0.1-----10是尺寸,+0.2是上偏差,-0.1是下偏差

dongfang_t 发表于 2006-7-19 19:47:00

<P>可以这么做啊,我还不知道,谢谢学长,这个问题困扰我好长时间了.</P>
<P>上下限对称的公差也是这样吗?</P>
页: [1]
查看完整版本: [求助]尺寸标注