Hi All,
I am working with ArcGIS Pro 3.4 and attempting to add a DGN file to my active map . The same DGN file loads successfully in ArcMap 10.8.1 without issues. However, when I try to add it in ArcGIS Pro, the application crashes immediately
I tried arcpy script to add but still it is crashing ArcGIS pro 3.4
import arcpy
fc = r"path-to-dgn"
try:
aprx = arcpy.mp.ArcGISProject("CURRENT")
active_map = aprx.activeMap
active_map.addDataFromPath(fc)
arcpy.AddMessage("Data added successfully to the map.")
except arcpy.ExecuteError:
# Corrected: Removed f-string and used string concatenation
arcpy.AddError("ArcGIS error: " + arcpy.GetMessages(2))
except Exception as e:
# Corrected: Removed f-string and used string concatenation
arcpy.AddError("An error occurred: " + str(e))
Please help if anyone faced this issue