|
发表于 2008-6-1 14:07:00
|
显示全部楼层
..................
If Abs(point1(0) - point2(0)) > 0 Then
'水平方向
location(0) = HMaxy + conLabel - conD * i
location(1) = HMaxy + conLabel - conD * i
location(2) = HMaxy + conLabel - conD * i
pt1(0) = point1(0)
pt1(1) = HMaxy + conLabel - 0.6 * conD - conD * i
pt1(2) = 0
pt2(0) = point2(0)
pt2(1) = HMaxy + conLabel - 0.6 * conD - conD * i
pt2(2) = 0
Set dimObj = ThisDrawing.ModelSpace.AddDimRotated(pt1, pt2, location, 0)
Set newText = ThisDrawing.TextStyles.Add("MYSTYLE")
newText.height = TextH ' 设定新样式的高度
ThisDrawing.Application.ZoomAll
' 增加标注间隙的距离
dimObj.TextGap = 4
dimObj.TextColor = acRed
dimObj.TextStyle = "MYSTYLE"
ThisDrawing.Regen acAllViewports
End If
...........
标注函数中 端线长度是pt1 ,pt2到点 location x 或 y方向的差值大致相等;
可以通过改变pt1 和pt2 是x 或 y方向的值来控制端线长度
|
|