Traffic_Islands = "Island+Kerb Topology\\Traffic_Islands" Kerb_Channel = "Island+Kerb Topology\\Kerb_Channel" class ButtonClass1(object): """Implementation for SetKerbType_addin.button (Button)""" def __init__(self): self.enabled = True self.checked = False def onClick(self): if len(arcpy.Describe(Traffic_Islands).fidset.split(";")) > 0: arcpy.CalculateField_management(Traffic_Islands, "KERB_TYPE", "\"SM3\"", "VB", "") else: #tell the user they are doing something wrong if len(arcpy.Describe(Kerb_Channel).fidset.split(";")) > 0: arcpy.CalculateField_management(Kerb_Channel, "KERBTYPE", "\"SM3\"", "VB", "") else: #tell the user they are doing something wrong
Does arcgisscripting even work with v10.0?
selectionCount = len(arcpy.describe(lyr).fidset.split(";")) #or selectionCount = int(arcpy.GetCount_management(gp.describe(lyr).catalogpath).getoutput(0)) - int(arcpy.GetCount_management(lyr).getoutput(0))
result = gp.GetCount(ParcelInfo) #Total Anno Count gp.SelectLayerByAttribute_management(SpecAnno, SubSel, AC[0]) result = gp.GetCount(ACParcelInfo) getSel = result.GetOutput(0) if getSel >= 1: do something elif getSel == 0: do something else
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.