1

So, my code goes something like this:

haveopenvel = arcpy.GetParameterAsText(10)
arcpy.AddMessage(haveopenvel)
if (haveopenvel == True):#error
    openvelftsec = Raster(openvelftsec)
    arcpy.MakeRasterLayer_management(openvelftsec,"openvelftsec","#",ext,"#")
else:
    ##Optional Model that can be 

However, the loop always goes into the else loop even when I check mark the input in the tool. COuld anyone tell me what is going wrong here?

3
  • The user is entering the text True? Then you need if (haveopenvel == 'True') – BERA Apr 25 '20 at 7:53
  • Replace arcpy.GetParameterAsText(10) with arcpy.GetParameter(10). – Hornbydd Apr 25 '20 at 8:50
  • Tried the change....still going in the else loop. No the user is clicking a radio button. – Debayan Mandal Apr 25 '20 at 16:34