I'd like the red x to show in the corner of the tool if they try to load the wrong feature class. That way we can prevent possible errors with the output. I've tried using the error messages arcpy functions but I only get the error message function after I select ok for the tool to run.
def getParameterInfo(self): # First parameter in_features = arcpy.Parameter(displayName="Data",name="Data",datatype="DEFeatureClass",parameterType="Required",direction="Input") messages.addMessage("Must Use Data Feature Class!!!!!") clearMessage() return [param0]
This will set the parameters so that any other feature class that isn't named "Data" can not be used. However, it gives the following error message. I would prefer to be able to customize the red x message saying that you can only input the "Data" feature class.
The Set Error Message also gives the invalid drop item warning. I'd rather have it as the red x in the corner and the pop up box.