So I believe doing it this way may actually work in a sense to get the Message Box using the python add-ins module. However, one issue I am having is doing the check to see which value from the message box the user selected. This is the first thing that happens when the user selects to use this tool. This is an add-in portion of the tool. Any help on figuring out how to call on the value in the Message Box will be helpful. The mb_type here is 4 so that the message box type is yes/no. Other mb_types and information about python add-ins can be found here. So my issue is figuring out how to see if the Message Box value the user selected was a yes or a no.
import arcpy
import pythonaddins
import os
toolPath = r'path to toolboox.tbx'
workspace = 'some workspace'
editor = arcpy.da.Editor(workspace)
if editor.isEditing == 'true':
pythonaddins.GPToolDialog(toolPath, 'CustomExportTool')
elif editor.isEditing == 'false':
pythonaddins.MessageBox("You must be in an edit session to run the Custom Export Tool. If you wish to turn an edit session on, please click 'yes'. If you do not wish to turn an edit session on, please click 'no'.", "Turn Editor On?", 4)
if MessageBox == 'yes':
editor.startEditing(False, False)
pythonaddins.GPToolDialog(toolPath, 'CustomExportTool')
elif MessageBox == 'no':
quit