如何改变直线的端点坐标值呀?
<P>Sub my_changeline_xyz()<BR> <BR> Dim UserMessage As String<BR> Dim ControlPoints As Variant<BR> Dim iCount As Long, iPoint As Integer<BR> <BR> Dim i, n As Long<BR> <BR> Dim newObjs As AcadLine</P><P> n = ThisDrawing.ModelSpace.Count<BR> <BR> For i = 0 To n - 1<BR> <BR> If ThisDrawing.ModelSpace.Item(i).ObjectName = "AcDbLine" Then<BR> <BR> Set newObjs = ThisDrawing.ModelSpace.Item(i)<BR> <BR> x1 = newObjs.startPoint(iCount)<BR> y1 = newObjs.startPoint(iCount + 1)<BR> z1 = newObjs.startPoint(iCount + 2)<BR> <BR> x2 = newObjs.endPoint(iCount)<BR> y2 = newObjs.endPoint(iCount + 1)<BR> z2 = newObjs.endPoint(iCount + 2)<BR></P>
<P> '坐标取出来了,怎么修改呀?</P>
<P> <BR> End If<BR> <BR> <BR> Next i<BR> <BR> MsgBox "Good on ya!"<BR> <BR>End Sub</P> <P>dim p1(2) as double,p2(2) as double</P>
<P>p2(0)=10:p2(1)=10</P>
<P>newObjs.startPoint=p1</P>
<P>newObjs.endPoint=p2</P>
<P> </P> <P>谢谢。可以改直线了。</P>
<P>我要把在一个平面的图转到另一个与其垂直的平面去。我还要转用其他命令画的图。现在在考虑改polyline的坐标。</P>
页:
[1]