如何更改尺寸标注位置?
vb语言中,默认的标注位置是中间
假如中间空间比较小,又要标注偏差什么的,所需空间比较大
我要把尺寸标注移动到外面来标注
用什么命令???
赐教 更改标注的文字位置。TextPosition 请具体说明
初学
赐教 Sub Example_TextPosition()<BR> Dim dimObj As AcadDimAligned<BR> Dim point1(0 To 2) As Double<BR> Dim point2(0 To 2) As Double<BR> Dim location(0 To 2) As Double<BR> <BR> '定义标注<BR> point1(0) = 5#: point1(1) = 3#: point1(2) = 0#<BR> point2(0) = 10#: point2(1) = 3#: point2(2) = 0#<BR> location(0) = 7.5: location(1) = 5#: location(2) = 0#<BR> <BR> Set dimObj = ThisDrawing.ModelSpace.AddDimAligned(point1, point2, location)<BR> <BR> '下面的三个属性设置文字的排列格式<BR> dimObj.TextInside = False<BR> dimObj.TextOutsideAlign = False<BR> dimObj.TextMovement = acMoveTextAddLeader<BR> <BR> ZoomExtents<BR> Debug.Print "The current text position for the dimension is " _<BR> & dimObj.TextPosition(0) & ", " _<BR> & dimObj.TextPosition(1) & ", " _<BR> & dimObj.TextPosition(2)<BR> <BR> '这里可以指定文字最后的位置<BR> location(0) = 15: location(1) = 10: location(2) = 0<BR> dimObj.TextPosition = location<BR> <BR> dimObj.Update<BR> ZoomExtents<BR> Dim retPoint As Variant<BR> retPoint = dimObj.TextPosition<BR> Debug.Print "The new text position for the dimension is " _<BR> & dimObj.TextPosition(0) & ", " _<BR> & dimObj.TextPosition(1) & ", " _<BR> & dimObj.TextPosition(2)<BR>End Sub<BR>以上程序代码大部分来自于AutoCAD的帮助系统。我觉得那里面很全面的,语法的知识很丰富,有时间多看看吧。 cobalt发表于2005-4-19 10:16:00static/image/common/back.gifSub Example_TextPosition() Dim dimObj As AcadDimAligned Dim point1(0 To 2) As Double Dim point2(0 To 2) As Double Dim loca...
非常感谢
我回去试试
我没装help文件
55<BR> 学了一招
页:
[1]