<?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 Code to add a layer to Arcmap from a prompted list in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/code-to-add-a-layer-to-arcmap-from-a-prompted-list/m-p/152935#M3946</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;SPAN&gt;I am new to all this and as you can tell from the question know nothing about VBA etc... so please be gentle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What i'm after is a bit of sample code that i can assign to what i assume will be a 'combobox' UIcontrol, so when clicking the button the user gets a list (predefined) and then that particular choice (in this case layer) is added to arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I already have the code for adding a layer into Arcmap. I just want to be able to combine it with a selection choice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know this is probably very simple 'Case Selection' code, but any help would be much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StuartN&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 17 Nov 2010 10:49:16 GMT</pubDate>
    <dc:creator>StuartNicholls</dc:creator>
    <dc:date>2010-11-17T10:49:16Z</dc:date>
    <item>
      <title>Code to add a layer to Arcmap from a prompted list</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/code-to-add-a-layer-to-arcmap-from-a-prompted-list/m-p/152935#M3946</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;SPAN&gt;I am new to all this and as you can tell from the question know nothing about VBA etc... so please be gentle.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What i'm after is a bit of sample code that i can assign to what i assume will be a 'combobox' UIcontrol, so when clicking the button the user gets a list (predefined) and then that particular choice (in this case layer) is added to arcmap.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I already have the code for adding a layer into Arcmap. I just want to be able to combine it with a selection choice.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I know this is probably very simple 'Case Selection' code, but any help would be much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;StuartN&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 10:49:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/code-to-add-a-layer-to-arcmap-from-a-prompted-list/m-p/152935#M3946</guid>
      <dc:creator>StuartNicholls</dc:creator>
      <dc:date>2010-11-17T10:49:16Z</dc:date>
    </item>
    <item>
      <title>Re: Code to add a layer to Arcmap from a prompted list</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/code-to-add-a-layer-to-arcmap-from-a-prompted-list/m-p/152936#M3947</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I assume you have an UICombobox set up.&amp;nbsp; So I can give you the abbreviated version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) In the MxDocument_OpenDocument event, add the layer names to your combobox control.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) Ensure your add layer sub routine takes in a paramenter, layer name.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3) In your ComboBox_SelectionChange event, call your sub routine with the currently selected layername.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That's the basics, you can get more fancy with the code but that's up to you.&amp;nbsp; Good luck.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Nov 2010 16:26:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/code-to-add-a-layer-to-arcmap-from-a-prompted-list/m-p/152936#M3947</guid>
      <dc:creator>SteveFang</dc:creator>
      <dc:date>2010-11-17T16:26:33Z</dc:date>
    </item>
  </channel>
</rss>

