Ejemplo n.º 1
0
 private static void ExtractSelectedFeatures(IFeatureWorkspace ifeatureWorkspace_0,
                                             ICompositeLayer icompositeLayer_0)
 {
     for (int i = 0; i < icompositeLayer_0.Count; i++)
     {
         ILayer layer = icompositeLayer_0.get_Layer(i);
         if (layer.Visible)
         {
             if (layer is IGroupLayer)
             {
                 ClipHelper.ExtractSelectedFeatures(ifeatureWorkspace_0, layer as ICompositeLayer);
             }
             else if (layer is IFeatureLayer)
             {
                 ClipHelper.ExtractSelectFeatureFormLayer(layer as IFeatureLayer, ifeatureWorkspace_0, null);
             }
         }
     }
 }
Ejemplo n.º 2
0
        public static void ExtractSelectedFeatures(IWorkspaceName iworkspaceName_0, IMap imap_0)
        {
            IWorkspace workspace = (iworkspaceName_0 as IName).Open() as IWorkspace;

            for (int i = 0; i < imap_0.LayerCount; i++)
            {
                ILayer layer = imap_0.get_Layer(i);
                if (layer.Visible)
                {
                    if (layer is IGroupLayer)
                    {
                        ClipHelper.ExtractSelectedFeatures(workspace as IFeatureWorkspace, layer as ICompositeLayer);
                    }
                    if (layer is IFeatureLayer)
                    {
                        ClipHelper.ExtractSelectFeatureFormLayer(layer as IFeatureLayer, workspace as IFeatureWorkspace,
                                                                 null);
                    }
                }
            }
        }