采用VBA输出的图纸,为什么尺寸界线在折线段上时会节节升高,数个垂直线的尺寸界线会集中到一起?
操作错误,上午忘了贴图,惭愧,请版主谅解
C:\Documents and Settings\Administrator\My Documents\My Pictures\VBA输出的图纸.gif
下边是部分代码,显示尺寸界线节节升高的部分和集中的部分(左侧),需要怎么做才能控制尺寸界线的长度(或高度):
kEndPoint(0) = 0 kEndPoint(1) = 0 kEndPoint(2) = 0 location(0) = 50 location(1) = 10 location(2) = 0
For i = 0 To Dot.Lowest cStartPoint(0) = cEndPoint(0) cStartPoint(1) = cEndPoint(1) cStartPoint(2) = cEndPoint(2) cEndPoint(0) = XLen(i) + cStartPoint(0) cEndPoint(1) = cStartPoint(1) - bData(i) cEndPoint(2) = 0 Set lineObj = ThisDrawing.ModelSpace.AddLine(cStartPoint, cEndPoint) Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(cStartPoint, cEndPoint, location) If i > 0 Then kEndPoint(0) = cStartPoint(0) kEndPoint(1) = cStartPoint(1) - kData(i - 1) kEndPoint(2) = 0 Set lineObj = ThisDrawing.ModelSpace.AddLine(cStartPoint, kEndPoint) Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(cStartPoint, kEndPoint, location) End If Next
|