c#.net + AutoCAD2006,请问如何得到直线、和多义线的端点坐标呢?迫切想知道,谢谢
c#.net + AutoCAD2006,请问如何得到直线、和多义线的端点坐标呢?迫切想知道,谢谢各位!c#.net + AutoCAD2006,请问如何得到直线端点坐标和多义线的各个顶点坐标?我需要得到这些点的坐标,然后由这些坐标绘出新的直线。望各位大侠指教! <p>顶起来 有知道的吗</p> 到对象浏览器里看看Line,PolyLine类 本帖最后由 作者 于 2007-8-14 15:02:28 编辑 <br /><br /> <p>我告你,用com写的,</p><p> If ent.objectname.Equals("AcDbPolyline") Then<br/> Dim objpl As IAcadLWPolyline = CType(ent, IAcadLWPolyline)<br/> Dim pt12(0 To 2) As Double : Dim pt23(0 To 2) As Double<br/> Dim obj1 As Object : Dim obj2 As Object : Dim obj3 As Object : Dim obj4 As Object<br/> Dim pt1(0 To 2) As Double : Dim pt2(0 To 2) As Double : Dim pt3(0 To 2) As Double : Dim pt4(0 To 2) As Double<br/> obj1 = objpl.Coordinate(0)<br/> obj2 = objpl.Coordinate(1)<br/> obj3 = objpl.Coordinate(2)<br/> obj4 = objpl.Coordinate(3)<br/> pt1(0) = obj1(0) : pt1(1) = obj1(1) : pt1(2) = 0<br/> pt2(0) = obj2(0) : pt2(1) = obj2(1) : pt2(2) = 0<br/> pt3(0) = obj3(0) : pt3(1) = obj3(1) : pt3(2) = 0<br/> pt4(0) = obj4(0) : pt4(1) = obj4(1) : pt4(2) = 0<br/> pt12(0) = pt(0) : pt12(1) = pt2(1) : pt12(2) = 0<br/> pt23(0) = pt3(0) : pt23(1) = pt(1) : pt23(2) = 0<br/> End If</p> 刚才是多义线,直线的两个端点对应于属性 startPoint和endPoint 一看lz,应该是个初学者,这个问题简单,就不用我来说了 关注!!!!
页:
[1]