ry888 发表于 2008-2-27 08:24:00

如何获得所选定的二维多义线的第一个顶点和最后一个顶点的坐标

如何获得所选定的二维多义线的第一个顶点和最后一个顶点的坐标

storyst 发表于 2008-2-27 10:01:00


AcadLWPolyline只能用Coordinates属性,
RETCOORD = lwline.Coordinates
   fstPoint(0) = RETCOORD(0)
   fstPoint(1) = RETCOORD(1)
   fstPoint(2) = 0
acadline才有startpoint和endpoint属性。
AcadLWPolyline只有读取选择的线段的Coordinates的个数,来找到RETCOORD(?)的值,读取末坐标。

ry888 发表于 2008-2-28 15:21:00

谢谢,那么如何得到多义线的顶点个数?

storyst 发表于 2008-2-28 15:47:00

sub getcoordcount()
    dim plobj as acadentity
    dim getcoordcount as long
    getcoordcount = (Ubound(plobj.coordinates)+1)/2
    msgbox getcoordcount
end sub

ry888 发表于 2008-2-28 21:48:00

谢谢指点
页: [1]
查看完整版本: 如何获得所选定的二维多义线的第一个顶点和最后一个顶点的坐标