AnsweredAssumed Answered

How to change output directory?

Question asked by alex1fly on Mar 26, 2015
Latest reply on Mar 26, 2015 by alex1fly

So I've got this great, simple loop running thanks to a member here. I set the workspace, pass in the array of files to be processed, run my tool, and append a descriptor to the filename. However this is all done in the same workspace. Is there a way to change the output directory to a different location while keeping my input workspace? The script is below.





import arcpy

from arcpy import env


#where we're working

env.workspace = r"D:\Broomfield.Lidar\HARN_Vertices.gdb"


#array of files to be processed

fc = ['D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN2W187North', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN2W188', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN3E180', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN3E190', 'D:\\Broomfield.Lidar\\HARN_Vertices.gdb\\VertexN3E191']



vertices = arcpy.ListFeatureClasses()

print vertices

for fc in vertices:

    arcpy.MinimumBoundingGeometry_management(fc, fc + "_Poly", "RECTANGLE_BY_AREA", "ALL", "", "NO_MBG_FIELDS")