Guest User

Untitled

a guest
Apr 23rd, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import arcpy
  2. import os
  3. input = arcpy.GetParameterAsText(0)
  4. name = os.path.basename(input).rstrip(os.path.splitext(input)[1])
  5. extension = os.path.splitext(input)[1].lstrip(".")
  6.  
  7. def CheckExtension(extension):
  8. if extension == 'shp':
  9. arcpy.SetParameterAsText(1, "true")
  10. arcpy.SetParameterAsText(2, "false")
  11. elif extension == 'gpx':
  12. arcpy.SetParameterAsText(2, "true")
  13. arcpy.SetParameterAsText(1, "false")
  14.  
  15. CheckExtension(extension)
Add Comment
Please, Sign In to add comment