I made a custom add-in for ArcMap (10.2 in my case) and was reviewing my code with a colleague. We're not sure if the setting the workspace is required in the code since the button's script is only going to be run in ArcMap where all the connections and features exist. It certainly works with the workspace set, but is it required to include it? What would be the best practice?
Code sample:
...
def onClick(self):
# set workspace to SDE connection
workspace = r"Database Connections\facilities@5160_93.sde"
# set the fields to the ones being flipped
fields = (["FROMLEFTP", "TORIGHTP", "TOLEFTP", "FROMRIGHTP",
"FROMLEFTA", "TORIGHTA", "TOLEFTA", "FROMRIGHTA",])
...