I am trying to export data driven pages using Arcpy but mxd.dataDrivenPages.pageCount return 0. Here what i am doing... first I am replacing the data source of the layer then refreshing the data driven pages and after that using for loop trying to export data driven pages in jpeg. Here what I am trying.. lyr.replaceDataSource(path_of_data_source, "SHAPEFILE_WORKSPACE", "data_source_name") mxd.dataDrivenPages.refresh() for pageNum in range ( 1 , mxd . dataDrivenPages . pageCount + 1 ): arcpy . AddMessage ( "Image " + str ( pageNum )) mxd . dataDrivenPages . currentPageID = pageNum arcpy . mapping . ExportToJPEG ( mxd , directory_env + "\Output_Images/" + str ( pageNum ) + ".jpeg" , resolution = 300 ) del mxd
... View more
Hi, I am trying to join excel sheet to shapefile attribute table using ArcPy, in the excel sheet there is a column which contains long hindi string. The maximum length of a text in attribute table is 254 but the hindi string is not joining with 254 characters instead the attribute table store only 107 characters approx. When trying with english it store 254 characters. This is the Excel sheet containing a long hindi string. This is the attribute table after joining the excel sheet like this it is not storing with max length 254 characters, it is only storing 107 characters. How to do it please help. Thank you!
... View more