Wednesday, August 27, 2014

Lấy đối tượng từ layer

HOW TO GET FEATURECLASS FROM LAYER

To get feature class (IFeatureClass) from ILayer, we first need to get the IFeatureLayer from ILayer and then IFeatureClass from IFeatureLayer.
Example:
private IFeatureClass getFeatureClass(ILayer pLayer)
{
    IFeatureLayer featLyr = lyr as FeatureLayer;
    IFeatureClass featCls = featLyr.FeatureClass;
    return featCls;
}

No comments:

Post a Comment