几何尺寸与公差论坛------致力于产品几何量公差标准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=9674)

yang686526 2009-04-21 12:41 PM

怎么得到一个图层中块的个数
 
怎么得到一个图层中块的个数
www.dimcax.com
怎么得到一个图层中块的个数
blocktable bt = (blocktable)trans.getobject(ltr.database.blocktableid, openmode.forwrite); blocktablerecord btr = (blocktablerecord)trans.getobject(bt[blocktablerecord.modelspace], openmode.forwrite); int count = 0; foreach (objectid id in btr) { count++; } 这样得出的是整个图中的所有块书,我就只想得到某一层的,有没有办法? layertable lt = (layertable)trans.getobject(db.layertableid, openmode.forwrite); layertablerecord ltr = (layertablerecord)trans.getobject(lt[layername], openmode.forwrite);
搞定了,搞个selectionfilter就行


所有的时间均为北京时间。 现在的时间是 11:17 PM.