AnsweredAssumed Answered

ArcGIS Pro 2.2 process abruptly ends when converting a dwg file

Question asked by saravanaganesh18 on Nov 6, 2019
Latest reply on Nov 7, 2019 by KKramer-esristaff

We are converting 100's of dwgs in batch using "Feature Class to Feature Class" option through python code. Following is the code we are using 

try:
    arcpy.conversion.FeatureClassToFeatureClass(src_dwg, gdb_name, fc_name)
    print (src_dwg)


except Exception:

    e = sys.exc_info()[1]
    print(e.args[0])

src_dwg i.e. dwg file name will be like this

 

 

W:\\002-PLANNING\\YEAR-2014\\17041.dwg\\Polygon
W:\\002-PLANNING\\YEAR-2014\\17110.dwg\\Polygon

 

The problem is, at times ArcGIS Pro is not reading a particular set of dwg files. It is reading those dwgs as empty file. Instead of processing the next file (try - except code should work here) ArcGIS Pro process the code and abruptly ends without throwing any error. For eg, if 17110.dwg is being read as empty file ArcGIS Pro is not taking the next file in the list. Instead, code ends at 17110.dwg. Then we have to manually remove the file 17110.dwg from the input list and have to run the code. Again if another similar dwg file is encountered, the code stops.

 

Even when i manually try to convert the dwg using Feature Class to Feature Class tool, it's showing as empty dwg and at times it crashes the ArcGIS Pro.

Outcomes