I am attempting to get a value from a selected feature in geodatabase, and pass that value into a URL link / query after the equals sign.
Opening the link to the image viewer works, if I don't try to pass in the field value.
How can I fix this?
import arcpy
import pythonaddins
import webbrowser
from threading import Thread
def GetParameterAsText (str.Unit_No):
"This prints a passed through string into this function"
import str
row.getValue(Unit_No)
def OpenBrowserURL ():
url = 'http://fcweb/caviewer#unit='
webbrowser.open(url,new=2)
class CAVButton(object):
"""Implementation for PythonButton_addin.CAVbutton (Button)"""
def init(self):
self.enabled = True
self.checked = False
def onClick(self):
t = Thread(target=OpenBrowserURL)
t.start()
t.join()
threadingbusiness is coming from, it's a workaround to ArcMap crashing when a web browser is opened from a Python add-in. – blah238 Apr 30 '13 at 22:23