几何尺寸与公差论坛

 找回密码
 注册
查看: 2795|回复: 1

could you find a better or rapid search method to get all local coordinate sy

[复制链接]
发表于 2006-12-4 22:22:39 | 显示全部楼层 |阅读模式
Dear Robin,


My goal is to find all local coordinate systems from 5000 features. But it takes about 5 seconds when I try to iterate these features via the following code. I think that it is too slow for an iterative operation of features.


Could you help me find a better or rapid search method to get all local coordinate systems?


Thanks in advance.


My code as follows:


LPDISPATCH dFeature = NULL;


LPDISPATCH dNextFeature = NULL;


// import the supported features


while (dFeature != NULL)


{


IFEATURE swFeature(dFeature);


CString featureTypeName = swFeature.GetTypeName();


// is this a coordinate system feature


if (featureTypeName.Compare(swTnCoordinateSystem) == 0)


{


CString CSysName = swFeature.GetName();


// do simple things


}


// get next feature


dNextFeature = swFeature.GetNextFeature();


// release current feature


swFeature.DetachDispatch();


if (dFeature)


{


dFeature->Release();


dFeature = NULL;


}


dFeature = dNextFeature;


}
 楼主| 发表于 2006-12-4 22:24:00 | 显示全部楼层

回复: could you find a better or rapid search method to get all local coordin

Hello ,
Have a look at FeatureManager.GetFeatures.  While this will not filter on feature types, it will give you all of the features for that document.




Regards,

-Earl
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|小黑屋|几何尺寸与公差论坛

GMT+8, 2024-5-19 14:05 , Processed in 0.040095 second(s), 19 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表