Hi All,
I have been using python script for conversion of MXDs to APRX files. we are able to create the aprx files but when I open its empty no layers or properties in newly converted aprx file. below is the script
import os
import pathlib
import arcpy
ogDir = r'D:\MXDs'
dirContents = os.listdir(ogDir)
for folder_path, subfolders, filenames in os.walk(ogDir):
for file in filenames:
if file[-4:] == '.mxd':
aprx = arcpy.mp.ArcGISProject('Current')
filePath = pathlib.Path(folder_path) / file
mxd = file[:-4]
aprx.importDocument(filePath)
aprx.saveACopy(folder_path + '\\' + mxd + '.aprx')
Kindly help me out where I can get same as like my MXD into aprx file.
Thanks,
Naveen