Greetings,
I have created a Python addin button. I currently have the name of specific file embedded in the addin python code. I will like to the script to be able to search for the file that is currently open in an edit session, rather than have to have a specific file name. This will also make sure that tool is not used outside of an edit session when changes can not be reversed.
I would like to the variable "inFeatures" to be equal something like "CURRENT" or whatever the path is to the file that is currently open for editing.
Any ideas?
Thanks
Fred
I have created a Python addin button. I currently have the name of specific file embedded in the addin python code. I will like to the script to be able to search for the file that is currently open in an edit session, rather than have to have a specific file name. This will also make sure that tool is not used outside of an edit session when changes can not be reversed.
Code:
def __init__(self):
self.enabled = True
self.checked = False
def onClick(self):
inFeatures="m8010_seginit_061213"
fieldName="LFM"
expression=3000
arcpy.CalculateField_management(inFeatures, fieldName, expression, "PYTHON")Any ideas?
Thanks
Fred