Select to view content in your preferred language

Preserving Line Types from CAD to GeoDatabase

155
5
4 weeks ago
AndrewMcKernan
Emerging Contributor

I am writing a script to convert CAD file into a format viewable in ArcGIS. I am using arcpy.CADToGeodatabase_conversion() for this purpose. 

 

In my source CAD file, I have a variety of line types that are all different, like so:

AndrewMcKernan_0-1734377441598.png

However, after running the function above and converting to a geodatabase, the same area has lines that are all homogenous:

AndrewMcKernan_1-1734377508699.png

Notice how the coloured and different shaped lines all have changed to be the same type of line in the ArcGIS feature class.

 

I'm new to both ArcGIS and AutoCAD. Is there a different function I should be using to convert CAD files to be viewable in ArcGIS and preserve the line types? Any guidance here would be appreciated. Thank you! 

0 Kudos
5 Replies
ThomasHoman
Frequent Contributor

Is the layer attribute preserved in the converted attribute table? You might need to symbolize the resultant data types accordingly.

Regards,

Tom

 

0 Kudos
AndrewMcKernan
Emerging Contributor

Hi Tom,

Thanks for your reply. I don't believe the layer attribute is being preserved. I'm new to this software - when you say to symbolize the resultant data types, what exactly do you mean/how would I do that?

Thanks,

Andrew

0 Kudos
ThomasHoman
Frequent Contributor

If you click on a line a popup should appear indicating what attributes are associated with that line. This will provide confirmation that the Layer value is an attribute.

Next, you can either right click on the feature layer and select symbolize or utilize the context menu and select Symbology. From there Change the symbol type to unique values and set the value to the Layer field. The table of contents on the left panel should change to a list with different colors for the various layers much like my original attachment - initially they came in as all one color.

 https://pro.arcgis.com/en/pro-app/latest/help/mapping/layer-properties/symbolize-feature-layers.htm 

 

0 Kudos
HaydenWelch
Frequent Contributor

There is no way to currently "preserve" linetypes between AutoCAD and ArcGIS unless your AutoCAD file was built using the ArcGIS plugin through Civil3D, and even then I think only very basic symbology is transferred.

You can export Line definitions to a file using LinOut . Then either use that as reference for your ArcPro linetypes, or try to do some magic with CIM definitions, but that would be a moderately large project as the CIM is massive and getting everything to translate cleanly from AutoCAD line definition files to Arc would be a bit of a headache given how a single definition in CAD is a multipart symbol in Arc.

If you aren't looking at a programatic solution to this and are instead okay with translating the linetypes manually, you just need to do some research on symbology.

0 Kudos
SumitMishra_016
Frequent Contributor

you can try Regenerate Symbology
SumitMishra_016_0-1734444341863.png
Also you can apply the same symbology as your source CAD using ArcGIS pro 

 

0 Kudos