|
发表于 2006-6-2 19:51:00
|
显示全部楼层
Sub Ch4_OffsetPolyline()
' 创建多段线
Dim plineObj As AcadLWPolyline
Dim points(0 To 11) As Double
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
Set plineObj = ThisDrawing.ModelSpace. _
AddLightWeightPolyline(points)
plineObj.Closed = True
ZoomAll
' 偏移多段线
Dim offsetobj As AcadLWPolyline
offsetobj = plineObj.Offset(0.25)
Dim line As AcadLine
Dim pnt1(2) As Double
Dim pnt2(2) As Double
'这里出问题了
pnt1(0) = offsetobj.Coordinates(0)
pnt1(1) = offsetobj.Coordinates(1)
pnt1(2) = 0
pnt2(0) = 10
pnt2(1) = 5
pnt2(2) = 0
Set line = ThisDrawing.ModelSpace.AddLine(pnt1, pnt2)
line.color = acBlue
ZoomAll
End Sub
这样还不行呀,帮帮忙呀,谢谢
|
|