|
真的,帮帮忙!在线等!都研究了两天了,发疯了!
如题,AddSpline怎用使用Closed 属性?
例:Private Sub Command12_Click()
'非有理B样条
Dim VetPoints(0 To 8) As Double
Dim anObj As AcadSpline
Dim Stan(0 To 2) As Double
Dim Etan(0 To 2) As Double
VetPoints(0) = 16: VetPoints(1) = 90: VetPoints(2) = 0: VetPoints(3) = 48: VetPoints(4) = 120
VetPoints(5) = 0: VetPoints(6) = 100: VetPoints(7) = 70: VetPoints(8) = 0
Stan(0) = 2: Stan(1) = 8: Stan(2) = 0
Etan(0) = 3: Etan(1) = 1: Etan(2) = 0
Set anObj = MoSpace.AddSpline(VetPoints, Stan, Etan)
anObj.Update
ZoomAll
End Sub
为什么不能直接使用“anobj.closed=true”,系统会提示说“不能给只读属性赋值”
而下面这个例子:
Private Sub Command11_Click()
'创建多段线
Dim plineObj1 As AcadPolyline
Dim points(0 To 11) As Double
points(0) = 10: points(1) = 65: points(2) = 0
points(3) = 10: points(4) = 80:
points(6) = 30: points(7) = 80:
points(9) = 45: points(10) = 80:
Set plineObj1 = AcadDoc.ModelSpace.AddPolyline(points)
plineObj.Closed = True
end sub
就可以直接使用“plineObj.Closed = True”,就能闭合。
为什么呢?会的大侠,麻烦帮个忙,不甚感激!
|
|