可以的,可以根据绘制的方向来判断(认为)逆时针还是顺时针,即x1-x0,如果大于等0认为是顺时针,反之逆时针。
再请教明总:
怎样获得pline的每一段SetBulge值呢?
下面的代码提示“参数不可选”错误,谢谢赐教。
Sub Example_SetBulge2() ' This example creates a light weight polyline in model space. ' It then finds and changes the bulge for a given segment. Dim plineObj As AcadLWPolyline Dim points(0 To 11) As Double Dim currentBulge As Double Dim i As Long ' Define the 2D polyline points points(0) = 1: points(1) = 1 points(2) = 1: points(3) = 2 points(4) = 2: points(5) = 2 points(6) = 3: points(7) = 2 points(8) = 4: points(9) = 4 points(10) = 4: points(11) = 1 ' Create a light weight Polyline object in model space Set plineObj = ThisDrawing.ModelSpace.AddLightWeightPolyline(points) ZoomAll 'MsgBox plineObj.SetBulge(0)
For i = 0 To 5 s = s + "plineObj.SetBulge(" + Str(i) + ")=" & plineObj.SetBulge(i) & vbCrLf Next i MsgBox s End Sub
|