>>> infc = 'pa_fp_rel1' >>> outfc = 'pa_fp_dat1' >>> InCursor = arcpy.SearchCursor(infc) >>> gdbCursor = arcpy.InsertCursor(outfc) >>> for InRow in InCursor: ... parcel = InRow.getValue('pafp_frq_PARCEL') ... fp_zone1 = InRow.getValue('pafp_frq_ZONE2') ... row = gdbCursor.newRow() ... if fp_zone1: ... fp_zone1 = fp_zone1.upper() ... row.pafp_frq_PARCEL = parcel ... row.pafp_frq_ZONE2 = fp_zone1 ... gdbCursor.insertRow(row) ... Runtime error Traceback (most recent call last): File "<string>", line 7, in <module> File "c:\program files (x86)\arcgis\desktop10.1\arcpy\arcpy\arcobjects\_base.py", line 35, in __setattr__ return setattr(self._arc_object, attr, ao) RuntimeError: ERROR 999999: Error executing function. >>> fieldsIn = arcpy.ListFields(infc) >>> for field in fieldsIn: ... print field.name ... OBJECTID pafp_frq_FREQUENCY pafp_frq_PARCEL pafp_frq_ZONE2 pafp_frq_Shape_Area pafp_frq2_OBJECTID pafp_frq2_FREQUENCY pafp_frq2_PARCEL pafp_frq2_Shape_Area >>> fieldsOut = arcpy.ListFields(outfc) >>> for field in fieldsOut: ... print field.name ... OBJECTID parcel fp_zone1 >>>
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.