[求助]哪位高手帮我逐行解析一下啊!谢了!
Dim ent As AcadEntity<BR> Dim pnt As Variant<BR> Dim NewCoord() As Double<BR> Dim i As Integer<BR> On Error Resume Next<BR> Do<BR> ThisDrawing.Utility.GetEntity ent, pnt, "选择多线段:"<BR> If Err Then Exit Sub<BR> If TypeName(ent) Like "IAcad*Polyline" Then Exit Do<BR> Loop<BR> Dim Coord As Variant<BR> Dim CoordCount As Integer<BR>If TypeName(ent) = "IAcadLWPolyline" Then<BR> Coord = ent.Coordinates<BR> CoordCount = (UBound(Coord) + 1) / 2<BR> ReDim NewCoord(UBound(Coord)) As Double<BR> For i = 0 To UBound(Coord) - 1 Step 2<BR> NewCoord(i/2) = Coord(i)<BR> NewCoord(i/2) = Coord(i + 1)<BR> Next i<BR>end if上面Newcoord()就是各顶点坐标
以上是求一个矩形四个顶点坐标的程序!哪位高手帮我逐行解析一下啊!谢了!
页:
[1]