<?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: Set Layer ID for a layer in ArcMap 10.3 in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544095#M14728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you finally&amp;nbsp; find a way to set this layer id ?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 May 2015 15:30:20 GMT</pubDate>
    <dc:creator>Marie-ChristineNicolle</dc:creator>
    <dc:date>2015-05-04T15:30:20Z</dc:date>
    <item>
      <title>Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544090#M14723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right now we have a lot of mxds with grouplayers (even som grouplayers with grouplayers).&lt;/P&gt;&lt;P&gt;If I import a .lyr file in ArcMap all layerids will be -1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to set the Layer Id for an ILayer in an mxd document but cannot find any ArcObjects interfaces exposing this property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ILayerDescriptions needs server objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 09:10:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544090#M14723</guid>
      <dc:creator>MichaelWinther1</dc:creator>
      <dc:date>2015-04-10T09:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544091#M14724</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't set Layer ID. It is pre-determined by the order of the layers in the document, and represents the layer's position in the TOC.&lt;/P&gt;&lt;P&gt;Maintaining a unique reference to a layer always used to be a challenge for this reason, as if you insert a layer, then the layer ID of other layers could change. The layer name is not guaranteed unique either, as you can have several layers in an mxd all with the same name. Your best option used to be to hold onto a Layer object itself, "heavyweight" though that might be, although that of course depends on what you're actually trying to achieve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 09:23:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544091#M14724</guid>
      <dc:creator>DavidMartin</dc:creator>
      <dc:date>2015-04-10T09:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544092#M14725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As of ArcGIS v10.3 you can assign unique numeric IDs for map service publishing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Right click the data frame (default:Layers) in the TOC of ArcMap&lt;/P&gt;&lt;P&gt;2. On the 'General' pane you can check 'Allow assignment of unique numeric IDs for map service publishing'. This will make the a property available for each layer in your map. Please see attached screendump in the 1st post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Layer property window you can actually assign an ID that should not change even if you change the order or add new layers. Totally new epic functionality.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help on locating the API entry for changing the Layer ID is still appreciated&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 10:01:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544092#M14725</guid>
      <dc:creator>MichaelWinther1</dc:creator>
      <dc:date>2015-04-10T10:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544093#M14726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah - I hadn't been aware of that new functionality. A good introduction!&lt;/P&gt;&lt;P&gt;So is it ILayerDescriptor (as opposed to ILayerDescription) that you need then?&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//00120000071p000000" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//00120000071p000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You can get an array of LayerDescriptors from a dataframe using IMapDescriptor interface.&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//00120000089z000000" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//00120000089z000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt; &lt;/P&gt;&lt;P&gt;You can get an array of MapDescriptors (one for each dataframe) from the map using the IMxdServer interface.&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//001200000mwr000000" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//001200000mwr000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt; &lt;/P&gt;&lt;P&gt;(Or you can get LayerDescriptors for the whole map from the IMxdServer interface directly)&lt;/P&gt;&lt;P&gt;And to get a reference to an IMxdServer interface (which shouldn't require ArcGIS for Server), it looks like you can use IMxdServer.Start:&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/Start_Method/001200000mwt000000/" title="http://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/Start_Method/001200000mwt000000/"&gt;ArcObjects Help for .NET developers&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Does that work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 10:49:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544093#M14726</guid>
      <dc:creator>DavidMartin</dc:creator>
      <dc:date>2015-04-10T10:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544094#M14727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All changes made in MxdServer will only be in that context and will not change the property for the layers in the mxd.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Apr 2015 11:34:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544094#M14727</guid>
      <dc:creator>MichaelWinther1</dc:creator>
      <dc:date>2015-04-10T11:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544095#M14728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you finally&amp;nbsp; find a way to set this layer id ?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 May 2015 15:30:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544095#M14728</guid>
      <dc:creator>Marie-ChristineNicolle</dc:creator>
      <dc:date>2015-05-04T15:30:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544096#M14729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately no.&lt;/P&gt;&lt;P&gt;Still working on it.&lt;/P&gt;&lt;P&gt;If I solve it, I will post the solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 06:16:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544096#M14729</guid>
      <dc:creator>MichaelWinther1</dc:creator>
      <dc:date>2015-05-05T06:16:25Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544097#M14730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #303030;"&gt;For now you can follow these steps&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #303030;"&gt;- you need to loop thru each extension of a layer&lt;BR /&gt;- QI to IServerLayerExtension&lt;BR /&gt;- if succeeded, you get hold of a PropertySet object using ServerProperties &lt;BR /&gt;- then get/set value to the key named ‘ServiceLayerID’&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: #1f497d;"&gt;&lt;SPAN style="color: #303030;"&gt;For now you cannot enable ‘allow assignment of unique numeric IDs for map service publishing’ programmatically&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #303030;"&gt;it is on a private interface. Esri &lt;STRONG&gt;&lt;SPAN style="text-decoration: underline;"&gt;peraphs&lt;/SPAN&gt; &lt;/STRONG&gt;adds it in 10.4&lt;/SPAN&gt; &lt;SPAN style="color: #303030;"&gt;but not sure&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;IMapDocument mapDocument &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MapDocumentClass&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Open&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"C:\\Temp\\MyProject.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
IMap b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
ILayerExtensions c &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; b&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Layer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ILayerExtensions&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
IServerLayerExtension g &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; c&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Extension&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IServerLayerExtension&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;

IPropertySet psN &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;PropertySet&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
psN&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ServiceLayerID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
g&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ServerProperties &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; psN&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Save&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #3d3d3d; font-family: Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif; font-size: 15px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; overflow-wrap: break-word; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;For table&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;IMapDocument mapDocument &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MapDocumentClass&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Open&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;@"C:\\Temp\\MyProject.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
IMap b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
IStandaloneTableCollection c &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; b &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IStandaloneTableCollection&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
ITableExtensions d &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; c&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_StandaloneTable&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ITableExtensions&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
IServerLayerExtension g &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; d&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Extension&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IServerLayerExtension&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
IPropertySet psN &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;PropertySet&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
psN&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;SetProperty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ServiceTableID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;8&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
g&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ServerProperties &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; psN&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Save&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:32:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544097#M14730</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2021-12-11T23:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544098#M14731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That did the trick. 90% done.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just need to take care of my layers not having any ILayerExtensions.&lt;/P&gt;&lt;P&gt;Fixed it by just creating one and adding it to the layer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems that sublayers (of the annotationclasses) of IAnnotationLayers are not part of IMap get_layers enumerator. But that's a different story.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 May 2015 05:50:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544098#M14731</guid>
      <dc:creator>MichaelWinther1</dc:creator>
      <dc:date>2015-05-12T05:50:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544099#M14732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;I encountered the same issue you are describing, while I'm programmatically updating IDs of Mxd Layers using ArcObjects 10.3.1:&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;I cannot set ID for Annotation sub Layers&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&amp;nbsp;&amp;nbsp;this happens because IAnnotationSubLayer (s) does not implement ILayerExtentions Interface&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you provide more details on how you solved the problem?&lt;/P&gt;&lt;P&gt;I'm referring to:&lt;/P&gt;&lt;P&gt;"Just need to take care of my layers not having any ILayerExtensions.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Fixed it by just creating one and adding it to the layer. "&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Thanks a lot for any explanation.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2019 10:45:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544099#M14732</guid>
      <dc:creator>AlessandroRussodivito</dc:creator>
      <dc:date>2019-08-28T10:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544100#M14733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alessandro,&lt;/P&gt;&lt;P&gt;p return 50&lt;/P&gt;&lt;P&gt;k return 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;IMapDocument mapDocument &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;MapDocumentClass&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Open&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;@"C:\Temp\Scratch\testanno.mxd"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
IMap b &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; mapDocument&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Map&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
ILayerExtensions c &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; b&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Layer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ILayerExtensions&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; p &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;c&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Extension&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IServerLayerExtension&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ServerProperties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetProperty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ServicelayerID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;var&lt;/SPAN&gt; k &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;b&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Layer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ICompositeLayer2&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Layer&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; ILayerExtensions&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;get_Extension&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; IServerLayerExtension&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ServerProperties&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;GetProperty&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"ServicelayerID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;IMG alt="" class="jive-emoji image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/458150_Cattura.PNG" /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 23:33:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544100#M14733</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2021-12-11T23:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544101#M14734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Domenico,&lt;/P&gt;&lt;P&gt;Thank you for the hint!&lt;/P&gt;&lt;P&gt;Unfortunately testing your code using 10.3.1, I could not solve&amp;nbsp;the problem.&lt;/P&gt;&lt;P&gt;ICompositeLayer2 allows me to access sublayer of the annotation Layer (using&amp;nbsp;((anLayer as ICompositeLayer2).get_Layer(0) ), but the cast to ILayerExtentions of the sublayer is not working.&lt;/P&gt;&lt;P&gt;I guess this is because of a difference in Interfaces implementation between Annotation Layer and Annotation Sub Layer (which should be a BUG addressed in greater versions)&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FDOGraphicsLayer&lt;/EM&gt; &lt;SPAN style="text-decoration: underline;"&gt;has the&lt;/SPAN&gt; Interface &lt;EM&gt;ILayerExtentions&lt;/EM&gt; :&lt;A class="link-titled" href="https://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/FDOGraphicsSublayerClass_Class/0012000000s9000000/" title="https://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#/FDOGraphicsSublayerClass_Class/0012000000s9000000/"&gt;ArcObjects Help for .NET developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While for &lt;EM&gt;FDOGraphicsSublayer&lt;/EM&gt;,&lt;SPAN style="text-decoration: underline;"&gt;&lt;EM&gt; ILayerExtentions&lt;/EM&gt; is missing&lt;/SPAN&gt;: -&amp;gt;&amp;nbsp;&lt;A class="link-titled" href="https://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0012000000s7000000" title="https://resources.arcgis.com/en/help/arcobjects-net/componenthelp/index.html#//0012000000s7000000"&gt;ArcObjects Help for .NET developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you using a different version (greater than 10.3.1) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2019 15:20:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544101#M14734</guid>
      <dc:creator>AlessandroRussodivito</dc:creator>
      <dc:date>2019-08-28T15:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544102#M14735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tested with 10.7.&amp;nbsp;&lt;/P&gt;&lt;P&gt;10.3.1 is retired december 2020&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2019 15:27:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544102#M14735</guid>
      <dc:creator>nicogis</dc:creator>
      <dc:date>2019-08-28T15:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Layer ID for a layer in ArcMap 10.3</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544103#M14736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know, 10.7 has the correct intefaces.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if ILayerExtentions could be added coding even to Annotation sublayers in 10.3.1, as Michael previously stated:&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Just need to take care of my layers not having any ILayerExtensions.&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;Fixed it by just creating one and adding it to the layer.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your hints are always appreciated,&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Alessandro&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Aug 2019 15:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-layer-id-for-a-layer-in-arcmap-10-3/m-p/544103#M14736</guid>
      <dc:creator>AlessandroRussodivito</dc:creator>
      <dc:date>2019-08-28T15:44:06Z</dc:date>
    </item>
  </channel>
</rss>

