(求助)vba编程的问题,请大家帮我
采用VBA输出的图纸,为什么尺寸界线在折线段上时会节节升高,数个垂直线的尺寸界线会集中到一起?C:\Documents and Settings\Administrator\My Documents\My Pictures\VBA输出的图纸 <P>图呢?</P><P>有可能的话把你的测试代码贴上</P> <P><FONT color=#ff0000><FONT color=#000000>采用VBA输出的图纸,为什么尺寸界线在折线段上时会节节升高,数个垂直线的尺寸界线会集中到一起?</FONT></FONT></P>
<P>操作错误,上午忘了贴图,惭愧,请版主谅解</P>
<P><FONT color=#ff0000>C:\Documents and Settings\Administrator\My Documents\My Pictures\VBA输出的图纸.gif</FONT></P>
<P><FONT color=#ff0000>下边是部分代码,显示尺寸界线节节升高的部分和集中的部分(左侧),需要怎么做才能控制尺寸界线的长度(或高度):</FONT></P>
<P> kEndPoint(0) = 0<BR> kEndPoint(1) = 0<BR> kEndPoint(2) = 0<BR> <BR> location(0) = 50<BR> location(1) = 10<BR> location(2) = 0<BR> </P>
<P> For i = 0 To Dot.Lowest<BR> cStartPoint(0) = cEndPoint(0)<BR> cStartPoint(1) = cEndPoint(1)<BR> cStartPoint(2) = cEndPoint(2)<BR> cEndPoint(0) = XLen(i) + cStartPoint(0)<BR> cEndPoint(1) = cStartPoint(1) - bData(i)<BR> cEndPoint(2) = 0<BR> Set lineObj = ThisDrawing.ModelSpace.AddLine(cStartPoint, cEndPoint)<BR> Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(cStartPoint, cEndPoint, location)<BR> If i > 0 Then<BR> kEndPoint(0) = cStartPoint(0)<BR> kEndPoint(1) = cStartPoint(1) - kData(i - 1)<BR> kEndPoint(2) = 0<BR> Set lineObj = ThisDrawing.ModelSpace.AddLine(cStartPoint, kEndPoint)<BR> Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(cStartPoint, kEndPoint, location)<BR> End If<BR> Next<BR></P> AddDimAligned的第三个参数是文字位置的三维WCS坐标,你怎么循环里都一样的? 查清了吧,循环出了问题?
页:
[1]