'创建引线标注 Public Function AddLeader() ' This example creates a leader in model space. ' The leader is not attached to any annotation object ' in this example. Dim leaderObj As AcadLeader, MTextObj As AcadMText Dim points(0 To 8) As Double Dim leaderType As Integer Dim annotationObject As AcadObject Dim textString As String Dim insertionPoint(0 To 2) As Double Dim height As Double Dim width As Double dim str as string
str=100 ' Define the new MText object textString = "大概可能" & str insertionPoint(0) = 10: insertionPoint(1) = 13: insertionPoint(2) = 0
' height = 1.8 width = 10 ' Create the MText object in model space Set MTextObj = ThisDrawing.ModelSpace.AddMText(insertionPoint, width, textString)
points(0) = 0: points(1) = 0: points(2) = 0 points(3) = 10: points(4) = 10: points(5) = 0 points(6) = 11: points(7) = 10: points(8) = 0 'leaderType = acLineWithArrow leaderType = acLineNoArrow Set annotationObject = MTextObj ' Create the leader object in model space Set leaderObj = ThisDrawing.ModelSpace.AddLeader(points, annotationObject, leaderType) ZoomAll End Function 这是我写的函数,高手看看怎么改变字高,默认是2.5
,改成1.8, |