|
Sub my_changeline_xyz()
Dim UserMessage As String
Dim ControlPoints As Variant
Dim iCount As Long, iPoint As Integer
Dim i, n As Long
Dim newObjs As AcadLine
n = ThisDrawing.ModelSpace.Count
For i = 0 To n - 1
If ThisDrawing.ModelSpace.Item(i).ObjectName = "AcDbLine" Then
Set newObjs = ThisDrawing.ModelSpace.Item(i)
x1 = newObjs.startPoint(iCount)
y1 = newObjs.startPoint(iCount + 1)
z1 = newObjs.startPoint(iCount + 2)
x2 = newObjs.endPoint(iCount)
y2 = newObjs.endPoint(iCount + 1)
z2 = newObjs.endPoint(iCount + 2)
'坐标取出来了,怎么修改呀?
End If
Next i
MsgBox "Good on ya!"
End Sub
|
|