阅读:2258回复:2
请看代码,为什么得到的结果是0呢?明明有对象啊!!!
MapControl1.AddShapeFile('H:\','DM1');<BR> ipLayer:= MapControl1.Layer[0];<BR> ipFeatureLayer:= ipLayer as IFeatureLayer;<BR> ipFeatureLayer.Get_FeatureClass(ipFeatureClass);<BR> ipFeatureClass.FeatureCount(nil, Count);<BR> Showmessage(IntTostr(Count));
|
|
1楼#
发布于:2006-12-01 17:15
只要你上面的代码不报错的话,那就说明对象是存在的,返回featurecout为0只能说明你添加的这个层是空层,没有feature
|
|
|
2楼#
发布于:2006-12-01 18:45
<P>我估计是我的liscence问题!</P>
|
|