![]() |
【转帖】获取多段线的顶点坐标集合
获取多段线的顶点坐标集合
www.dimcax.com 获取多段线的顶点坐标集合 如此是不行的 polyline2d ent = trans.getobject(id, openmode.forwrite) as polyline2d; polyline2d pl2d=ent; vertex2d v2d; point3dcollection ptarr = new point3dcollection(); foreach (objectid polyid in pl2d) { v2d = (vertex2d)hostapplicationservices.workingdatabase.transactionmanager.getobject(id, openmode.forread);??这得转换失败,如果强制转换则v2d为空了 if (v2d != null) { ptarr.add(new point3d(v2d.position.x, v2d.position.y, 0)); } } 我是vs05+cad09 恳求指点 |
所有的时间均为北京时间。 现在的时间是 09:22 PM. |