新手上路,如何返回得到这个代码生成的多段线对象?
<p>Sub gcorner()<br/>Dim FstPnt As Variant<br/>Dim SndPnt As Variant<br/>On Error Resume Next</p><p>FstPnt = ThisDrawing.Utility.GetPoint(, "选取矩形第一角点:")<br/>SndPnt = ThisDrawing.Utility.GetCorner(FstPnt, "选取矩形对角点:")</p><p>Call drawbox(FstPnt, SndPnt) '调用画矩形子程序</p><p>End Sub<br/></p><p>Private Function drawbox(p1, p2) '根据对角线坐标画矩形的子程序</p><p>Dim boxp(0 To 14) As Double</p><p>boxp(0) = p1(0)<br/>boxp(1) = p1(1)</p><p>boxp(3) = p1(0)<br/>boxp(4) = p2(1)</p><p>boxp(6) = p2(0)<br/>boxp(7) = p2(1)</p><p>boxp(9) = p2(0)<br/>boxp(10) = p1(1)</p><p>boxp(12) = p1(0)<br/>boxp(13) = p1(1)</p><p>Call ThisDrawing.ModelSpace.AddPolyline(boxp)</p><p>End Function</p><p>这是一段代码,调用drawbox函数绘制矩形,现在想调用这个多段线对象,不知道该如何获得?请教!</p>
页:
[1]