几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   ObjectARX(VB.NET/C#) (http://www.dimcax.com/hust/forumdisplay.php?f=176)
-   -   【转帖】获取多段线的顶点坐标集合 (http://www.dimcax.com/hust/showthread.php?t=9965)

yang686526 2009-04-21 05:59 PM

【转帖】获取多段线的顶点坐标集合
 
获取多段线的顶点坐标集合
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.