几何尺寸与公差论坛------致力于产品几何量公差标准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(C++) (http://www.dimcax.com/hust/forumdisplay.php?f=34)
-   -   【转帖】[求助]用com遍历模型空间中的text (http://www.dimcax.com/hust/showthread.php?t=6904)

yang686526 2009-04-16 05:07 PM

【转帖】[求助]用com遍历模型空间中的text
 
[求助]用com遍历模型空间中的text
[求助]用com遍历模型空间中的text
我想用com遍历模型空间中的文字,但是不知道怎么下手?希望各位高手赐教!!!
还有一个问题就是,我有一段查看字符串数目的程序,不知道怎么搞的?运行结果都是"0"?
int isum=0;
colevariant index;
for(long i=0;i<mospace.getcount();++i)
{
index =i;
iacadentity obj=mospace.item(index);
cstring str=obj.getobjectname();
if(str=="acdbtext"||str=="acdbmtext")
++isum;
}
cstring msg;
msg.format("text count is %d",isum);
afxmessagebox(msg);


所有的时间均为北京时间。 现在的时间是 04:42 AM.