I noticed on another link in the ArcGIS help sections that it states parameterType is read-only. On the one I provided, it states that it is both read and write. However, I managed to figure out my own solution to my problem. The reason I didn't go with setting both of them to optional, was that when someone picks a "Polygon" type, the field I need to be enabled and required, still says "optional" by the parameter where it is entered. This is a tool that might eventually be given to clients, so this could lead to alot of confusion. I found the solution in using the .clearmessages() method and placing the logic to them under the updateMessages(self) function . My code looks like this:
import arcpy
class ToolValidator(object):
def __init__(self):
self.params = arcpy.GetParameterInfo()
def initializeParameters(self):
return
def updateParameters(self):
if self.params[0].value:
desc = arcpy.Describe(self.params[0].value)
feature_type = desc.shapeType
if feature_type == "Polygon":
self.params[7].enabled = True
if self.params[7].value == "All":
self.params[8].enabled = True
else:
self.params[8].enabled = False
else:
self.params[7].enabled = False
self.params[8].enabled = True
return
def updateMessages(self):
if self.params[0].value:
desc = arcpy.Describe(self.params[0].value)
feature_type = desc.shapeType
if feature_type == "Polygon":
if self.params[7].value == "All":
pass
else:
self.params[8].clearMessage()
else:
self.params[7].clearMessage()
return
This got the tool working the way I wanted it based on what the geometry type of the first inputs. Also if parameterType is read-only, it would be nice if someone at ESRI would correct that for the link I provided in the first post.