Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. import arcpy
  2.  
  3. # Local variables:
  4. Links_Final = "Links_Final"
  5. condition = ""RR1"= 777 OR "RR2"=777 OR "RR3"=777 OR "RR4"=777"
  6.  
  7. # Process: Select Layer By Attribute
  8. arcpy.SelectLayerByAttribute_management(Links_Final, "NEW_SELECTION", condition)
  9.  
  10. value = int(arcpy.GetParameterAsText(0))
  11. condition = ""RR1"= value OR "RR2"= value OR "RR3"= value OR "RR4"= value"
  12.  
  13. import arcpy
  14.  
  15. # Local variables:
  16. Links_Final = "Links_Final"
  17. value = int(arcpy.GetParameterAsText(0))
  18.  
  19. condition = """ "RR1" = {0} OR "RR2" = {0} OR "RR3" = {0} OR "RR4" = {0} """.format(value)
  20.  
  21. # Process: Select Layer By Attribute
  22. arcpy.SelectLayerByAttribute_management(Links_Final, "NEW_SELECTION", condition)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement