<?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 Re: Select multiple feature classes in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560376#M15123</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;How do I select several features from several different feature classes at one time? I know which features I want to select from within the separate feature classes. So, how do I put that together to perform a selection?&lt;BR /&gt;&lt;BR /&gt;Once I have all of the features selected do I need to do something special to get them to show up in the attribute editor window? I'm trying to select several different spatial objects and have each one appear in the attribute editor window like it does if I were to manually draw a selection rectangle around several objects on the map.&lt;BR /&gt;&lt;BR /&gt;Is this a BUG? Does anyone have any sample code that allows the programmatic selection of several spatial features and have those same features appear in the attribute editor window? Can anyone else reproduce this problem?&lt;BR /&gt;&lt;BR /&gt;Greg&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you suppose to switch on all layers as selectable ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 Dec 2010 03:58:17 GMT</pubDate>
    <dc:creator>Venkata_RaoTammineni</dc:creator>
    <dc:date>2010-12-22T03:58:17Z</dc:date>
    <item>
      <title>Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560375#M15122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I select several features from several different feature classes at one time? I know which features I want to select from within the separate feature classes. So, how do I put that together to perform a selection?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Once I have all of the features selected do I need to do something special to get them to show up in the attribute editor window? I'm trying to select several different spatial objects and have each one appear in the attribute editor window like it does if I were to manually draw a selection rectangle around several objects on the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is this a BUG? Does anyone have any sample code that allows the programmatic selection of several spatial features and have those same features appear in the attribute editor window? Can anyone else reproduce this problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Dec 2010 19:16:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560375#M15122</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2010-12-21T19:16:59Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560376#M15123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;How do I select several features from several different feature classes at one time? I know which features I want to select from within the separate feature classes. So, how do I put that together to perform a selection?&lt;BR /&gt;&lt;BR /&gt;Once I have all of the features selected do I need to do something special to get them to show up in the attribute editor window? I'm trying to select several different spatial objects and have each one appear in the attribute editor window like it does if I were to manually draw a selection rectangle around several objects on the map.&lt;BR /&gt;&lt;BR /&gt;Is this a BUG? Does anyone have any sample code that allows the programmatic selection of several spatial features and have those same features appear in the attribute editor window? Can anyone else reproduce this problem?&lt;BR /&gt;&lt;BR /&gt;Greg&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you suppose to switch on all layers as selectable ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 03:58:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560376#M15123</guid>
      <dc:creator>Venkata_RaoTammineni</dc:creator>
      <dc:date>2010-12-22T03:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560377#M15124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Greg, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I understand your question correctly, yes this can be done.&amp;nbsp; Your first selection must be esriSelectionResultEnum.esriSelectionResultNew and the subsequent selections be of esriSelectionResultEnum.esriSelectionResultAdd.&amp;nbsp; Here's a sample...&amp;nbsp; not a spatial query, but it should get you going in the right direction.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pMap.ClearSelection() 'clear the selection set&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pQueryFilter = New ESRI.ArcGIS.Geodatabase.QueryFilter&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pQueryFilter.WhereClause = "POLENUMBER = '" &amp;amp; m_Criteria &amp;amp; "'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeatureSelection = Nothing&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectionresult = ESRI.ArcGIS.Carto.esriSelectionResultEnum.esriSelectionResultNew&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For x = 0 To m_count - 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If Not m_pFlayer(x) Is Nothing Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeatureLayer = m_pFlayer(x)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeatureSelection = pFeatureLayer&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pActiveView.PartialRefresh(ESRI.ArcGIS.Carto.esriViewDrawPhase.esriViewGeoSelection, Nothing, Nothing)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pFeatureSelection.SelectFeatures(pQueryFilter, selectionresult, False)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; selectionresult = ESRI.ArcGIS.Carto.esriSelectionResultEnum.esriSelectionResultAdd&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next x&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope this helps,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sherry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 13:11:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560377#M15124</guid>
      <dc:creator>SherryVotava</dc:creator>
      <dc:date>2010-12-22T13:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560378#M15125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Venkat and Sherry,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you so much for responding to my thread. Everything you have said is true and is what I am currently doing. I was afraid I had something seriously wrong in my code. However, it appears the way I am selecting data is correct. Venka, I'm using your suggestion to make sure the layer is selectable, visible, editable. Sherry, I saw the IFeatureSelection example and implemented it pretty much as provided.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, what is weird is the first time I call my selection routine, via command button, it selects all the correct data and displays the selected data correctly in the attribute window. But then if I try a new selection sending it through the same code it selects the data but won't allow it to appear in the attribute window. I physically have to stop and restart ArcMap to get it to select and display the data in the attribute window.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I'm trying to do is select several different feature classes on the map programmatically, but also have those selected features appear in the attribute window. It is similar to using the select by rectangle and having the attribute window refresh itself each time a selection changes. Would either of you have time to confirm or test this behavior to see if you can reproduce it? Is there something else I need to do to refresh the attribute window?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Dec 2010 21:37:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560378#M15125</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2010-12-22T21:37:22Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560379#M15126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Venkat and Sherry,&lt;BR /&gt;&lt;BR /&gt;Thank you so much for responding to my thread. Everything you have said is true and is what I am currently doing. I was afraid I had something seriously wrong in my code. However, it appears the way I am selecting data is correct. Venka, I'm using your suggestion to make sure the layer is selectable, visible, editable. Sherry, I saw the IFeatureSelection example and implemented it pretty much as provided.&lt;BR /&gt;&lt;BR /&gt;But, what is weird is the first time I call my selection routine, via command button, it selects all the correct data and displays the selected data correctly in the attribute window. But then if I try a new selection sending it through the same code it selects the data but won't allow it to appear in the attribute window. I physically have to stop and restart ArcMap to get it to select and display the data in the attribute window.&lt;BR /&gt;&lt;BR /&gt;What I'm trying to do is select several different feature classes on the map programmatically, but also have those selected features appear in the attribute window. It is similar to using the select by rectangle and having the attribute window refresh itself each time a selection changes. Would either of you have time to confirm or test this behavior to see if you can reproduce it? Is there something else I need to do to refresh the attribute window?&lt;BR /&gt;&lt;BR /&gt;Greg&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please send me the code so that we can work it out...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 02:55:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560379#M15126</guid>
      <dc:creator>Venkata_RaoTammineni</dc:creator>
      <dc:date>2010-12-23T02:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560380#M15127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greg, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You probably just need to force a refresh.&amp;nbsp; Here's what I usually use...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pActiveView.Refresh() 'sometimes a .PartialRefresh will do&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pSelEvents = pMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pSelEvents.SelectionChanged()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sherry&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 13:23:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560380#M15127</guid>
      <dc:creator>SherryVotava</dc:creator>
      <dc:date>2010-12-23T13:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560381#M15128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Venkat and Sherry,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you SO MUCH for your continued support on this it really has me confused.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've included my code below. I make the selection through an attribute query.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Keep in mind the selection works just fine. The first time through the routine&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;it selects and displays in the attribute window fine. However, if you try to make&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;a second selection it will select but it won't display in the attribute window. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried partial and full refreshes and nothing helps. I don't know what else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
public static void SelectMyID(int MyID)
{
&amp;nbsp; using (ComReleaser comReleaser = new ComReleaser())
&amp;nbsp; try
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMap.ClearSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureWorkspace featworkspace = MyEditor3.EditWorkspace as IFeatureWorkspace;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IQueryFilter2 queryfilter2 = new QueryFilterClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; queryfilter2.WhereClause = "ID = " + MyID;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureClass featClass = null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; ITable MyTable = featworkspace.OpenTable("MyTable");
&amp;nbsp;&amp;nbsp;&amp;nbsp; ICursor cur = MyTable.Search(queryfilter2, false);
&amp;nbsp;&amp;nbsp;&amp;nbsp; comReleaser.ManageLifetime(cur);&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; IRow row = null;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((row = cur.NextRow()) != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; featClass = featworkspace.OpenFeatureClass(row.get_Value((int)row.Fields.FindField("MyTable")).ToString());
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (featClass != 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; switch (featClass.AliasName)
 {
&amp;nbsp;&amp;nbsp; case "Feature1":
&amp;nbsp;&amp;nbsp; case "Feature2":
&amp;nbsp;&amp;nbsp; case "Feature3":
&amp;nbsp;&amp;nbsp; case "Feature4":
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SelectFeature(featClass, (int)row.get_Value(row.Fields.FindField("ClassID")), 0, false, true);
&amp;nbsp;&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; MyFindCommandAndExecute("{AB073B49-DE5E-11D1-AA80-00C04FA37860}", -1); //Zoom to selected
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMxDoc.ActiveView.Refresh();
&amp;nbsp; }
&amp;nbsp; catch (Exception ex)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyRecordError(ex);
&amp;nbsp; }
}

public static void SelectFeature(IFeatureClass FC, int MyID, int AltID, bool ZoomTo, bool MultiSel)
{
&amp;nbsp; try
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(!MultiSel)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MyMap.ClearSelection();
&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureSelection vFeatSel = GetCurrentLayer(FC.AliasName, 0) as IFeatureSelection;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (vFeatSel == null)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IQueryFilter2 queryfilt2 = new QueryFilterClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (AltID &amp;gt; 0)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryfilt2.WhereClause = "OtherID = " + AltID;
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; queryfilt2.WhereClause = "ClassID = " + MyID;
&amp;nbsp;&amp;nbsp;&amp;nbsp; if(MultiSel)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vFeatSel.SelectFeaturesqueryfilt2, esriSelectionResultEnum.esriSelectionResultAdd, false);
&amp;nbsp;&amp;nbsp;&amp;nbsp; else
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; vFeatSel.SelectFeatures(queryfilt2, esriSelectionResultEnum.esriSelectionResultNew, false);
&amp;nbsp;&amp;nbsp;&amp;nbsp; vFeatSel.SelectionChanged();
&amp;nbsp;&amp;nbsp;&amp;nbsp; if (ZoomTo)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FindCommandAndExecute("{AB073B49-DE5E-11D1-AA80-00C04FA37860}", -1);//esriArcMapUI.ZoomToSelectedCommand
&amp;nbsp; }
&amp;nbsp; catch (Exception ex)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyRecordError(ex);
&amp;nbsp; }
}
 
public static IFeatureLayer GetCurrentLayer(string sLayerName, int SubType)
{
&amp;nbsp; try
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; ESRI.ArcGIS.esriSystem.UID pID = new ESRI.ArcGIS.esriSystem.UIDClass();
&amp;nbsp;&amp;nbsp;&amp;nbsp; pID.Value = "{40A9E885-5533-11D0-98BE-00805F7CED21}";// IFeatureLayer
&amp;nbsp;&amp;nbsp;&amp;nbsp; IMap myMap = myMxDoc.Activeview.FocusMap as IMap;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IEnumLayer pEnumLayer = MyMap.get_Layers(pID, true) as IEnumLayer;
&amp;nbsp;&amp;nbsp;&amp;nbsp; pEnumLayer.Reset();
&amp;nbsp;&amp;nbsp;&amp;nbsp; IFeatureLayer pFL;
&amp;nbsp;&amp;nbsp;&amp;nbsp; while ((pFL = pEnumLayer.Next() as IFeatureLayer) != null)
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (pFL.FeatureClass.AliasName.ToLower() == sLayerName.ToLower())
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {
 return pFL;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; }
&amp;nbsp; catch (Exception ex)
&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp; MyRecordError(ex, "Layer Name = " + sLayerName);
&amp;nbsp; }
&amp;nbsp; return null;
}
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:11:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560381#M15128</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2021-12-12T00:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560382#M15129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I wrote another c# solution using the USA data found in the developer kit and was able to reproduce the problem. I have submitted an incident to ESRI technical support on this problem. I'll post my findings if and when I get them.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Greg&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Dec 2010 14:54:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560382#M15129</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2010-12-27T14:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Select multiple feature classes</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560383#M15130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Here is the solution to this problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=20165" rel="nofollow noopener noreferrer" target="_blank"&gt;http://resources.arcgis.com/content/kbase?fa=articleShow&amp;amp;d=20165&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Adding the following three lines of code to the bottom of my selection routine solved the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
&lt;SPAN style="font-family:&amp;amp;quot;"&gt;ISelectionEvents pSelEvents;
pSelEvents = myMap as ISelectionEvents;
pSelEvents.SelectionChanged();&lt;/SPAN&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:11:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/select-multiple-feature-classes/m-p/560383#M15130</guid>
      <dc:creator>GregRieck</dc:creator>
      <dc:date>2021-12-12T00:11:03Z</dc:date>
    </item>
  </channel>
</rss>

