What I want to do is to go into a folder, find a layer file, pull it into an MXD, then export a jpeg in an output folder. Everything is great except I don't know how to set the input/output folders.
state = arcpy.GetParameterAsText(0)
In_Folder = arcpy.GetParameterAsText(1)
Out_Folder = arcpy.GetParameterAsText(2)
lyrfile_o = arcpy.mapping.Layer(In_Folder + str(state) + "_O.lyr")
lyrfile_d = arcpy.mapping.Layer(In_Folder + str(state) + "_D.lyr")
lyrfile_lane = arcpy.mapping.Layer(In_Folder + str(state) + "_Lanes_.lyr")
lyrfile_poly = arcpy.mapping.Layer(In_Folder + str(state) + "_Lanes_Polys1.lyr")
and I get an error like:
: Object: CreateObject Layer invalid data source>
It's written in a text editor then brought into a toolbox and parameters set, both types as folders, the first one (state) is a string.
Any ideas?
No comments:
Post a Comment