Dear sir!
When I tried to create a .lyr file, The following error message come. I cant understand what's wrong with my script.
Please help me to solve it.
import arcpy
from arcpy import env
env.workspace = r"J:\Gampaha\51027202\CM51027202.gdb\CM51027202"
arcpy.MakeFeatureLayer_management("PCL_PG", "ASD")
arcpy.SaveToLayerFile_management("ASD", "AMD.lyr", "ABSOLUTE")
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
arcpy.SaveToLayerFile_management("ASD", "AMD.lyr", "ABSOLUTE")
File "C:\Program Files\ArcGIS\Desktop10.2\arcpy\arcpy\management.py", line 6640, in SaveToLayerFile
raise e
ExecuteError: ERROR 999999: Error executing function.
Failed to execute (SaveToLayerFile).
Thanks
Padmasiri