I have code that doesn't work at the moment:
# Import arcpy module import arcpy # Script arguments Input = arcpy.GetParameterAsText(0) if Input == '#' or not Input: Input = "frame" # provide a default value if unspecified Symbology = arcpy.GetParameterAsText(1) if Symbology == '#' or not Symbology: Symbology = "symbology" # provide a default value if unspecified ### Local variables: Rearrange = Symbology line_connection_shp = Rearrange ### Process: Apply Symbology From Layer arcpy.ApplySymbologyFromLayer_management(Input, Symbology) Process: Points To Line arcpy.PointsToLine_management(Rearrange, line_connection_shp, "MMSI", "", "NO_CLOSE")
What this is doing is applying my layer symbology (a .lyr file) to a shapefile.
This results in an error:
ERROR 000732: Input Layer: Dataset C:\temp\test.shp does not exist or is not supported.
It works fine when I apply these tools myself, but creates errors while using it in Python.
This must be an issue with trying to input a shapefile into the ApplyFromSymbology tool, so is there a way to use a shapefile with that tool?