shp = "WaEinbauten" with arcpy.da.SearchCursor(shp, ["GelaendeH"]) as cursor: for row in cursor: if not vertexElevation > 0: vertexElevation = 0 else: vertexElevation = row[0] arcpy.MakeFeatureLayer_management(shp, "pts_lyr", "GelaendeH = " + str(vertexElevation)) arcpy.Adjust3DZ_management("pts_lyr", "NO_REVERSE", vertexElevation)
import arcpy ... from arcpy import env ... env.overwriteOutput = 1 ... ... shp = r"S:\Public\Projekte\2011\11420\WVA Hochneukirchen\wasser.mdb\LK\WaEinbauten" ... shp_copy = r"S:\Public\Projekte\2011\11420\WVA Hochneukirchen\wasser.mdb\LK\WaEinbauten_copy" ... ... arcpy.Copy_management(shp, shp_copy) ... ... with arcpy.da.SearchCursor(shp_copy, ["GelaendeH"]) as cursor: ... for row in cursor: ... vertexElevation = row[0] ... arcpy.MakeFeatureLayer_management(shp, "pts_lyr", "Elevation = " + str(vertexElevation)) ... arcpy.Adjust3DZ_management("pts_lyr", "NO_REVERSE", vertexElevation) ...
shp = r"S:\Public\Projekte\2011\11420\WVA Hochneukirchen\wasser.mdb\LK\WaEinbauten" shp_copy = r"S:\Public\Projekte\2011\11420\WVA Hochneukirchen\wasser.mdb\LK\WaEinbauten_copy" arcpy.Copy_management(shp , shp_copy) with arcpy.da.SearchCursor(shp_copy, ["GelaendeH"]) as cursor: ...
>>> import arcpy ... from arcpy import env ... env.overwriteOutput = 1 ... ... shp = r"S:\Public\Projekte\2011\11420\WVA Hochneukirchen\wasser.mdb\LK\WaEinbauten" ... ... with arcpy.da.SearchCursor(shp, ["GelaendeH"]) as cursor: ... for row in cursor: ... vertexElevation = row[0] ... arcpy.MakeFeatureLayer_management(shp, "pts_lyr", "Elevation = " + str(vertexElevation)) ... arcpy.Adjust3DZ_management("pts_lyr", "NO_REVERSE", vertexElevation) ... Runtime error Traceback (most recent call last): File "<string>", line 11, in <module> File "c:\program files (x86)\arcgis\desktop10.2\arcpy\arcpy\management.py", line 2101, in Adjust3DZ raise e ExecuteError: ERROR 000204: Fehler beim Erstellen des Eingabe-Feature-Cursors Fehler beim Ausführen von (Adjust3DZ). >>>
shp = r"c:\data\mydb.mdb\<feature class name>"
import arcpy from arcpy import env env.overwriteOutput = 1 shp = r"C:\data\pointsZ.shp" with arcpy.da.SearchCursor(shp, ["Z"]) as cursor: for row in cursor: vertexElevation = row[0] arcpy.MakeFeatureLayer_management(shp, "pts_lyr", "Elevation = " + str(vertexElevation)) arcpy.Adjust3DZ_management("pts_lyr", "NO_REVERSE", vertexElevation)
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.