czj 发表于 2005-1-18 09:25:00

[求助] 如何通过在getpoint 来定点来做引线

我想做一条引线,通过getpoint        取点       ,并且屏幕如何能在一点和


二点之间有画线的痕迹

czj 发表于 2005-1-18 10:07:00

Me.Hide<BR>Dim basepoint1, basepoint2, basepoint3 As Variant<BR>Dim leaderObj As AcadLeader<BR>Dim points(0 To 8) As Double<BR>Dim leaderType As Integer<BR>Dim annotationObject As AcadObject


' Return a point using a prompt<BR>basepoint1 = ThisDrawing.Utility.GetPoint(, "请输入引线第一个点: ")<BR>basepoint2 = ThisDrawing.Utility.GetPoint(basepoint1, "请输入引线第二个点: ")<BR>basepoint3 = ThisDrawing.Utility.GetPoint(basepoint2, "请输入引线第三个点: ")<BR>                       <BR>                       <BR>points(0) = basepoint1(0): points(1) = basepoint1(1): points(2) = basepoint1(2)<BR>points(3) = basepoint2(0): points(4) = basepoint2(1): points(5) = basepoint2(2)<BR>points(6) = basepoint3(0): points(7) = basepoint3(1): points(8) = basepoint3(2)


leaderType = acLineWithArrow<BR>Set annotationObject = Nothing


' 在模型空间中创建引线对象<BR>Set leaderObj = ThisDrawing.ModelSpace. _<BR>AddLeader(points, annotationObject, leaderType)


ZoomAll<BR>

sdxylijian 发表于 2005-1-18 10:50:00

多谢了!刚才把代码测试了一下,真的很好,又学到了不少东西。


谢谢czj老师。
页: [1]
查看完整版本: [求助] 如何通过在getpoint 来定点来做引线