ArcGIS pro crashes while adding CAD data to map

248
6
Jump to solution
3 weeks ago
SumitMishra_016
Frequent Contributor

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

SumitMishra_016_0-1737011737573.pngSumitMishra_016_1-1737011797127.png

 

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

 

Tags (4)
0 Kudos
1 Solution

Accepted Solutions
SumitMishra_016
Frequent Contributor

Thanks for replying @DanPatterson!

Using CAD to Geodatabase caused ArcGIS Pro to crash.

I discovered the issue was due to the units in the DGN file not being set to meters.

SumitMishra_016_0-1737456260920.png

Changing the units to meters resolved the problem for me.

SumitMishra_016_1-1737456377277.png

Here is the script for Microstation V8 in case someone else encounters this issue.

Public Sub changeunit()
 
 
Dim fol As Folder
Dim fil As File
Dim fso As New FileSystemObject
Set fol = fso.GetFolder("folder-path-to-DGN")
For Each fil In fol.Files
Set dsg = Application.OpenDesignFile(fil.Path)
    CadInputQueue.SendCommand "set units meters"
CadInputQueue.SendCommand "FILEDESIGN"
 
Next
 
End Sub


But still ArcMap automatically assigning the units and ArcGIS pro does not.


 

View solution in original post

0 Kudos
6 Replies
DanPatterson
MVP Esteemed Contributor

Try

CAD To Geodatabase (Conversion)—ArcGIS Pro | Documentation

and there are warnings about dgn files which may be the issue with your approach


... sort of retired...
SumitMishra_016
Frequent Contributor

Hi @DanPatterson ,
Thanks for replying!

Why is the DGN file not opening in ArcGIS Pro 3.4 when I attempt to add it to my active map, while the same DGN file loads successfully in ArcMap 10.8.1 without any issues?


0 Kudos
DanPatterson
MVP Esteemed Contributor

If it doesn't open in a blank map with no basemap or coordinate system set, then you should report it to Tech Support.  If it does open in an empty map, then preconditions needed to show it aren't met in Pro.

Remember, ArcGIS Pro is completely different piece of software and that is why they have the cad to geodatabase tool,


... sort of retired...
SumitMishra_016
Frequent Contributor

Thanks @DanPatterson for replying!

I attempted to open the file in a blank map without a basemap or coordinate system, but the same error occurred.

SumitMishra_016_0-1737430367103.png

 

SumitMishra_016_1-1737430420159.png

 


I reported the issue to ESRI Tech Support, and they informed me that the data is corrupt. However, I want to understand why the DGN file opens successfully in ArcMap 10.8.1 but not in ArcGIS Pro 3.4?

Is there a way to identify what is missing in the DGN file for it to work in ArcGIS Pro?

0 Kudos
DanPatterson
MVP Esteemed Contributor

Tech Support would be able to answer that.  Pro has more checks on data than arcmap did and not all of those checks are public.

You didn't indicate whether Cad to Geodatabase worked or didn't.


... sort of retired...
0 Kudos
SumitMishra_016
Frequent Contributor

Thanks for replying @DanPatterson!

Using CAD to Geodatabase caused ArcGIS Pro to crash.

I discovered the issue was due to the units in the DGN file not being set to meters.

SumitMishra_016_0-1737456260920.png

Changing the units to meters resolved the problem for me.

SumitMishra_016_1-1737456377277.png

Here is the script for Microstation V8 in case someone else encounters this issue.

Public Sub changeunit()
 
 
Dim fol As Folder
Dim fil As File
Dim fso As New FileSystemObject
Set fol = fso.GetFolder("folder-path-to-DGN")
For Each fil In fol.Files
Set dsg = Application.OpenDesignFile(fil.Path)
    CadInputQueue.SendCommand "set units meters"
CadInputQueue.SendCommand "FILEDESIGN"
 
Next
 
End Sub


But still ArcMap automatically assigning the units and ArcGIS pro does not.


 

0 Kudos