<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Need help with ArcGIS developer tools in Visual Studio in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741219#M19686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i need help with ArcMap developer tools. I'm trying to make an ArcMap command with Visual Studio 2010 in C# which deletes selected (could be all) points from point set. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe it should be a ArcMap basecommand. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think i need to create an envelope to cover all the points in the layer. Then it should start editing and delete those points. But i'm a newbie at c# and Visual Studio. Could anyone give me code examples of using Ienvelope this way? Or something similar to learn from?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Dec 2012 13:53:28 GMT</pubDate>
    <dc:creator>VidmantasAskinis</dc:creator>
    <dc:date>2012-12-03T13:53:28Z</dc:date>
    <item>
      <title>Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741219#M19686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i need help with ArcMap developer tools. I'm trying to make an ArcMap command with Visual Studio 2010 in C# which deletes selected (could be all) points from point set. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I believe it should be a ArcMap basecommand. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think i need to create an envelope to cover all the points in the layer. Then it should start editing and delete those points. But i'm a newbie at c# and Visual Studio. Could anyone give me code examples of using Ienvelope this way? Or something similar to learn from?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 13:53:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741219#M19686</guid>
      <dc:creator>VidmantasAskinis</dc:creator>
      <dc:date>2012-12-03T13:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741220#M19687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;There might be a better solution for this but i would do it like that:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private IEditor editor;
private IWorkspace workspace;
private IFeatureLayer featLayer;

private void DeleteFeatures(IFeatureLayer featLayer)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //if there is already a selection on feature layer you can get all selected features
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureSelection featureSelection = featLayer as IFeatureSelection; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ISelectionSet selectionSet = featureSelection.SelectionSet;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ICursor cursor;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //in search method you can use QueryFilter to query features or you can use 'null' and you will get all features in layer
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectionSet.Search(null, false, out cursor);
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IRow row = cursor.NextRow();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.StartEditing(workspace);

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (row != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Delete();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = cursor.NextRow();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editor.StopEditing(true);
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now to obtain editor from ArcMap:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void GetEditor()
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UID uidEditor = new UIDClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; uidEditor.Value = "esriEditor.Editor";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; editor = ArcMap.Application.FindExtensionByCLSID(uidEditor) as IEditor;
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To get workspace I would do sth like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void GetFileWorkspace(IFeatureLayer featLayer)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureDataset featDataset = featLayer.FeatureClass.FeatureDataset;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureWorkspace featWorkspace = (IFeatureWorkspace)featDataset.Workspace;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; workspace = (IWorkspace)featWorkspace;
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now you need feature layer:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private void GetMapLayers()
{
 uid.Value = "{40A9E885-5533-11D0-98BE-00805F7CED21}";
 IEnumLayer enumLayerByName = map.get_Layers((UID)uid, true);
 enumLayerByName.Reset();
 ILayer iLayer = enumLayerByName.Next();

 while (!(iLayer == null))
 {
&amp;nbsp; switch (iLayer.Name)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp; case "YourLayerName":
&amp;nbsp;&amp;nbsp;&amp;nbsp; featLayer = (IFeatureLayer)iLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .........(more cases)
&amp;nbsp;&amp;nbsp; default:
&amp;nbsp;&amp;nbsp;&amp;nbsp; break;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741220#M19687</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2021-12-12T07:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741221#M19688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank you for a great response. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But i'm still wondering about using Ienvelope. Maybe you or somebody else could give me just an example how to use envelope. Just to learn more about Visual Studio.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 09:35:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741221#M19688</guid>
      <dc:creator>VidmantasAskinis</dc:creator>
      <dc:date>2012-12-05T09:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741222#M19689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Thank you for a great response. &lt;BR /&gt;&lt;BR /&gt;But i'm still wondering about using Ienvelope. Maybe you or somebody else could give me just an example how to use envelope. Just to learn more about Visual Studio.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Well honestly don't know why you are so attached to IEnvelope... Here I give you the documentation for this interface: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/IEnvelope_Interface/002m00000169000000/"&gt;ESRI DOC IEnvelope&lt;/A&gt;&lt;SPAN&gt;, there is a lot of .net samples in there, just look for what you are looking for.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 09:45:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741222#M19689</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2012-12-05T09:45:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741223#M19690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What exactly are you trying to do?&amp;nbsp; Are you wanting the user to sketch an envelope on the map that indicates which features they want to delete?&amp;nbsp; If so, you need a tool not a command.&amp;nbsp; If you want to simply delete all of the features in a layer then you just need to call ITable.DeleteSearchedRows and pass in null.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DirectCast(featureLayer.FeatureClass, ITable).DeleteSearchedRows(Nothing)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to delete a subset of the features in the layer then create a query filter and pass it into the method.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 12:21:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741223#M19690</guid>
      <dc:creator>NeilClemmons</dc:creator>
      <dc:date>2012-12-05T12:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741224#M19691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, I believe I need "users to sketch an envelope on the map that indicates which features they want to delete." So yes, i need a tool. I've seen all samples in here &amp;gt; &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/SelectFeatures/0048000000m1000000/"&gt;http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#/SelectFeatures/0048000000m1000000/&lt;/A&gt;&lt;SPAN&gt;, but couldn't find exact envelope and feature selection sample.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Dec 2012 15:07:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741224#M19691</guid>
      <dc:creator>VidmantasAskinis</dc:creator>
      <dc:date>2012-12-05T15:07:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741225#M19692</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Yes, I believe I need "users to sketch an envelope on the map that indicates which features they want to delete." So yes, i need a tool.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;So why is arcmap's selection bad for your needs? This is like a basic functionality for ArcMap...(Select [features] by rectangle/polygon/lasso/circle/line you pick).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 05:26:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741225#M19692</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2012-12-06T05:26:01Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741226#M19693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;That's because i'm trying to make it to select points before user started editing. I think only envelope can do that. Please correct me if i'm wrong.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 15:30:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741226#M19693</guid>
      <dc:creator>VidmantasAskinis</dc:creator>
      <dc:date>2012-12-06T15:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741227#M19694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Ok maybe i don't understand what you have to do in your project. But sure, you can select features without starting editing. See atachments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;To make it clear you want a tool for selecting features (without starting the edit session)? - you have it in arcmap. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You want to delete selected features? - it's like the most basic functionality in all gis programs. So where is the case?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm just trying to understand what do you want to achieve:)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 16:11:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741227#M19694</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2012-12-06T16:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741228#M19695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The thing is that points should be selected automatically (for example, all points in active view). And then deleted. It seems i forgot to mention it the beginning of this thread &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 06 Dec 2012 17:57:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741228#M19695</guid>
      <dc:creator>VidmantasAskinis</dc:creator>
      <dc:date>2012-12-06T17:57:54Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741229#M19696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The thing is that points should be selected automatically (for example, all points in active view). And then deleted. It seems i forgot to mention it the beginning of this thread &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ye you did forgot to mention that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok here is the solution:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private IMxDocument MxDoc = ArcMap.Document;

protected override void OnClick()
{
 IActiveView activeView = MxDoc.ActiveView;

 IEnvelope env = activeView.Extent;
 IGeometry geom = (IGeometry)env;
 Map.SelectByShape(geom, null, false);
 activeView.PartialRefresh(esriViewDrawPhase.esriViewGeoSelection, null, env);
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;But here is the thing. It selects all features from ALL layers I don't know if that is a problem but you can later delete features only from one layer. Of course to do that you need to start edit session:)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is one more option: before selecting by shape you can set the selectable property for feature layers that you don't want to be selected to false. I would do this like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
IUID uid = new UIDClass();
uid.Value = "{40A9E885-5533-11D0-98BE-00805F7CED21}";
IEnumLayer enumLayerByName = Map.get_Layers((UID)uid, true);
enumLayerByName.Reset();
ILayer iLayer = enumLayerByName.Next();
while (!(iLayer == null))
{
 if (iLayer.Name != "your_layer_name")
 {
&amp;nbsp; IFeatureLayer featLayer= (IFeatureLayer)iLayer;
&amp;nbsp; featLayer.Selectable = false;
 }
 iLayer = enumLayerByName.Next();
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:33:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741229#M19696</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2021-12-12T07:33:11Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741230#M19697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Now i need help making the code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You wrote "Map.get_Layers((UID)uid, true);" . Is "Map" an interface (private IMap Map)? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here too: "Map.SelectByShape(geom, null, false);"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You also wrote&amp;nbsp;&amp;nbsp; "editor = ArcMap.Application.FindExtensionByCLSID(uidEditor) as IEditor;"&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp; "private IMxDocument MxDoc = ArcMap.Document;"&amp;nbsp; . Is "ArcMap" an "internal static class" like in &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;internal static class ArcMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; private static IApplication s_app = null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; private static IDocumentEvents_Event s_docEvent;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Dec 2012 09:15:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741230#M19697</guid>
      <dc:creator>VidmantasAskinis</dc:creator>
      <dc:date>2012-12-10T09:15:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741231#M19698</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Now i need help making the code. &lt;BR /&gt;&lt;BR /&gt;You wrote "Map.get_Layers((UID)uid, true);" . Is "Map" an interface (private IMap Map)? &lt;BR /&gt;Here too: "Map.SelectByShape(geom, null, false);"&lt;BR /&gt;&lt;BR /&gt;You also wrote&amp;nbsp;&amp;nbsp; "editor = ArcMap.Application.FindExtensionByCLSID(uidEditor) as IEditor;"&amp;nbsp;&amp;nbsp; and&amp;nbsp;&amp;nbsp; "private IMxDocument MxDoc = ArcMap.Document;"&amp;nbsp; . Is "ArcMap" an "internal static class" like in &lt;BR /&gt;&lt;BR /&gt;internal static class ArcMap&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; private static IApplication s_app = null;&lt;BR /&gt;&amp;nbsp; private static IDocumentEvents_Event s_docEvent;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's in every simple sample:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
private IMap map = ArcMap.Document.FocusMap;
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;About ArcMap, yes it is this class. It's automatically generated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:33:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741231#M19698</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2021-12-12T07:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741232#M19699</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Works like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But i see that it deletes all features (points, polylines etc.). How can i make it to delete only points and leave everything else in place? Add points to pointcollection and then delete? please help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 13 Dec 2012 16:14:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741232#M19699</guid>
      <dc:creator>VidmantasAskinis</dc:creator>
      <dc:date>2012-12-13T16:14:44Z</dc:date>
    </item>
    <item>
      <title>Re: Need help with ArcGIS developer tools in Visual Studio</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741233#M19700</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you want to delete features in specified layer you can do it this way:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
privat void DeleteFeatures(IFeatureLayer featLayer)
{
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DeleteFeatures deleteFeatures = new DeleteFeatures();
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; deleteFeatures.in_features = featLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RunTool(GP, deleteFeatures, null);
}
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MDruzgala&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:33:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/need-help-with-arcgis-developer-tools-in-visual/m-p/741233#M19700</guid>
      <dc:creator>MarcinDruzgala</dc:creator>
      <dc:date>2021-12-12T07:33:16Z</dc:date>
    </item>
  </channel>
</rss>

