Solved! Go to Solution.
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)
shp = r"c:\data\mydb.mdb\<feature class name>"
>>> 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"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" ... 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) ...