<?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: 10.1 addin combobox value in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518141#M40598</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see you still don't have any answers for this. Can you provide more information with your question? For example: the whole piece of code you are using, the error you are receiving...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not familiar with any of the new features in 10.1, but in 10 you get values from inputs (including, I presume, comboboxes) via &lt;/SPAN&gt;&lt;STRONG&gt;arcpy.GetValueAsText()&lt;/STRONG&gt;&lt;SPAN&gt;. Or are you using something like &lt;/SPAN&gt;&lt;STRONG&gt;Tk&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2012 00:38:47 GMT</pubDate>
    <dc:creator>StacyRendall1</dc:creator>
    <dc:date>2012-04-24T00:38:47Z</dc:date>
    <item>
      <title>10.1 addin combobox value</title>
      <link>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518140#M40597</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm having a bad time getting the value from a combobox.&amp;nbsp; I thought it should just be something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;myText = comboboxName.value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;...but I can't seem to get it going.&amp;nbsp; Any ideas?&amp;nbsp; Any sample code?!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Apr 2012 16:50:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518140#M40597</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2012-04-23T16:50:26Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 addin combobox value</title>
      <link>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518141#M40598</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Kevin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I see you still don't have any answers for this. Can you provide more information with your question? For example: the whole piece of code you are using, the error you are receiving...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am not familiar with any of the new features in 10.1, but in 10 you get values from inputs (including, I presume, comboboxes) via &lt;/SPAN&gt;&lt;STRONG&gt;arcpy.GetValueAsText()&lt;/STRONG&gt;&lt;SPAN&gt;. Or are you using something like &lt;/SPAN&gt;&lt;STRONG&gt;Tk&lt;/STRONG&gt;&lt;SPAN&gt;?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 00:38:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518141#M40598</guid>
      <dc:creator>StacyRendall1</dc:creator>
      <dc:date>2012-04-24T00:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 addin combobox value</title>
      <link>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518142#M40599</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; Kevin,&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I see you still don't have any answers for this. Can you provide more information with your question? For example: the whole piece of code you are using, the error you are receiving...&amp;nbsp; &lt;BR /&gt; &lt;BR /&gt;I am not familiar with any of the new features in 10.1, but in 10 you get values from inputs (including, I presume, comboboxes) via&amp;nbsp;&amp;nbsp; &lt;STRONG style=": ; color: &amp;quot;#0000FF&amp;quot;; font-style: italic;"&gt;arcpy.GetValueAsText()&lt;/STRONG&gt;. Or are you using something like&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;Tk&lt;/STRONG&gt;?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If you have not got 10.1 and are not trying to use the new 10.1 only AddIns module for Python then you cannot help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I can't work it out either. I assume we have to understand how namespaces in classes work. We have to find the name of the instance of the class which might be that ID that we fill in at the wizard screen.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 04:27:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518142#M40599</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2012-04-24T04:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 addin combobox value</title>
      <link>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518143#M40600</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Could you post your script? How to get the value of the combobox depends on the context in which you're fetching it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 15:58:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518143#M40600</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2012-04-24T15:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 addin combobox value</title>
      <link>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518144#M40601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to pick from a combobox to get a list of distances for the multibuffer gp tool.&amp;nbsp; upon clicking the map, the buffers are built.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
import pythonaddins


class BufferTool(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for MultiBuffer_addin.tool (Tool)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.cursor = 3

&amp;nbsp;&amp;nbsp;&amp;nbsp; def onMouseDownMap(self, x, y, button, shift):

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; buffers= {"buffer1": [70, 1200], \
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "buffer2": [110, 1700],\
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "buffer3": [150, 1850]}
&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; sr = arcpy.SpatialReference(arcpy.Describe("parcels").spatialReference.factoryCode)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = arcpy.PointGeometry(arcpy.Point(x,y), sr)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.overwriteOutput = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.addOutputsToMap = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptfeat = arcpy.management.CopyFeatures(pt, r"in_memory\pt")
&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; buff = "{0}".format(BufferType.value)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print buff
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print buffers[buff]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; theBuffers = buffers[buff]
&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; #arcpy.MultipleRingBuffer_analysis(ptfeat, r'in_memory\blastzone', [200, 400]) # works
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.MultipleRingBuffer_analysis(ptfeat, r'in_memory\blastzone', theBuffers)
&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; arcpy.RefreshActiveView()


class BufferType(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for MultiBuffer_addin.distance (ComboBox)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.hintText = 'buffer type'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.items = ["buffer1", "buffer2", "buffer3"]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.editable = False
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.dropdownWidth = 'WWWWWWWWWW'
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.width = 'WWWWWWWWWW'

&amp;nbsp;&amp;nbsp;&amp;nbsp; def onSelChange(self, selection):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print self.value&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:36:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518144#M40601</guid>
      <dc:creator>KevinBell</dc:creator>
      <dc:date>2021-12-11T22:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: 10.1 addin combobox value</title>
      <link>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518145#M40602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yeah, you can't use BufferType as that's the class and not the instance of the class that's used, you have to use the value of the combo box's ID as a variable name. So if its ID is defined as &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;MyNewAddin_addin.somecombobox&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt; in the wizard, you'll use &lt;/SPAN&gt;&lt;PRE class="plain" name="code"&gt;somecombobox.value&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 20:54:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/10-1-addin-combobox-value/m-p/518145#M40602</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2012-04-24T20:54:50Z</dc:date>
    </item>
  </channel>
</rss>

