Benomar Posted September 24, 2015 Report Share Posted September 24, 2015 Hi everybody, This is my first time to this forum and I have a little problem with arcpy code: #Current map document mxd = arcpy.mapping.MapDocument("CURRENT") #Export x = raw_input("Insert the Name please ") arcpy.mapping.ExportToJPEG(mxd,x+".jpg") what is wrong with this code, I need your help Please. Quote Link to comment Share on other sites More sharing options...
flori Posted February 17, 2016 Report Share Posted February 17, 2016 try with full path befor inputing the name of jpg, i should work arcpy.mapping.ExportToJPEG(mxd,"C:\\"+x+".jpg") Quote Link to comment Share on other sites More sharing options...
intertronic Posted March 22, 2016 Report Share Posted March 22, 2016 hi, well the python funciton raw_input() is not compatible in arcpy if you use it in the python window (>>>) in arcmap... Quote Link to comment Share on other sites More sharing options...
intertronic Posted March 22, 2016 Report Share Posted March 22, 2016 import arcpyfrom arcpy import mapping as mapath_original = arcpy.GetParameterAsText(0)newtitle = arcpy.GetParameterAsText(1)path_expotert = arcpy.GetParameterAsText(2)mappa = ma.MapDocument(path_original)ma.ExportToJPEG(mappa,path_expotert +'/' + newtitle + '.jpg') 1 Quote Link to comment Share on other sites More sharing options...
intertronic Posted March 22, 2016 Report Share Posted March 22, 2016 http://www.mediafire.com/download/p9s4xazujy5ksc2/script.tbx Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.