This thread started a year ago, but maybe you will still find this helpful. I have been trying to figure out the same thing for a while and I finally figured it out. Here, I have provided the link to my help thread that I answered when I figured the process out. Hope this helps!
Polyline Z to Buffer with same Z dimensions??
Hi Joe,The following workflow should work:1. Add a field of type Double called 'Elevation' to your lines feature class 2. Right-click on the field > Calculate Geometry > Max (or Min) Z of Geometry3. Run the standard 'Buffer' tool on the lines feature class. Before executing the tool, be sure to go to the Environment Settings > Z values > 'Enable' Output has Z values4. The output will contain the 'Elevation' field. Using the below python code, you can iterate through each polygon and adjust the Z value using this field's value:import arcpy from arcpy import env env.overwriteOutput = 1 env.workspace = r"C:\Default.gdb" fc = "lines_buffer" with arcpy.da.SearchCursor(fc, ["Elevation"]) as cursor: for row in cursor: vertexElevation = row[0] arcpy.MakeFeatureLayer_management(fc, "lines_lyr", "Elevation = " + str(vertexElevation)) arcpy.Adjust3DZ_management("lines_lyr", "NO_REVERSE", vertexElevation)
import arcpy from arcpy import env env.overwriteOutput = 1 env.workspace = r"C:\Default.gdb" fc = "lines_buffer" with arcpy.da.SearchCursor(fc, ["Elevation"]) as cursor: for row in cursor: vertexElevation = row[0] arcpy.MakeFeatureLayer_management(fc, "lines_lyr", "Elevation = " + str(vertexElevation)) arcpy.Adjust3DZ_management("lines_lyr", "NO_REVERSE", vertexElevation)
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.