Select to view content in your preferred language

ArcGIS Pro 3.0.2: How to extract a particular feature class from a CAD file (dwg) in the model builder?

727
8
10-06-2022 10:06 AM
JamalNUMAN
Legendary Contributor

ArcGIS Pro 3.0.2: How to extract a particular feature class from a CAD file (dwg) in the model builder?

 

For example, in the screenshot below, I couldn’t figure out which tool I need to use in order ot extract the polyline feature class from the CAD file in the model builder

 

Clip_283.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
8 Replies
RhettZufelt
MVP Notable Contributor

Have not loaded it in a model, but I use Feature Class to Feature Class for this all the time.

R_

JamalNUMAN
Legendary Contributor

“feature class to feature class” tool comes by default with file geodatabase as an input. When deleting the file geodatabase and connecting with the CAD file, it’s not recognized as per the screenshots below

 

Clip_284.jpgClip_285.jpgClip_286.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
RhettZufelt
MVP Notable Contributor

I just browse to and pick the polyline layer of the dwg for the Input Features.

Just tested in Model builder, worked as expected.

RhettZufelt_1-1665086999488.pngRhettZufelt_2-1665087007929.png

R_

JamalNUMAN
Legendary Contributor

That’s correct but when picking the polyline layer then it gets in the model as an input (blue color). I need it to be as an output (green layer) from the dwg

 

In the final design for the model interface for the very end user, I need him\her just to choose the dwg file as an input and then to run

 

Clip_297.jpgClip_298.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
ThomasHoman
Occasional Contributor III

Hi @JamalNUMAN 

Have you looked at the CAD to Geodatabase tool? https://pro.arcgis.com/en/pro-app/latest/tool-reference/conversion/cad-to-geodatabase.htm 

Perhaps in your model import the CAD file into a working/temp geodatabase then extract what you need and delete the gdb.

Regards,

Tom

JamalNUMAN
Legendary Contributor

Two issues with the “CAD to File Geodatabase” tool:

 

  • Not sure why the CAD layers are saved inside Feature Dataset but not directly in the root File Geodatabase
  • How to extract the “polyline” feature class from the “feature dataset”?

 

Clip_315.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos
ThomasHoman
Occasional Contributor III

I am not sure on why a Feature Dataset is used but it sort of makes sense organizationally given the typical complexity of a CAD file. 

Have a look at inline variable substitution https://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/modelbuilder/inline-variable-su... In your case %Output Feature Dataset%\Polyline would be an applicable example of usage. You can use it to feed downstream tools like Select to filter for the desired CAD layer. In my CAD dwgs I might want to feed this to separate lot lines from easements via different selects.

JamalNUMAN
Legendary Contributor

I couldn’t figure out how “variable” can be implemented in order to extract feature class from the Feature Dataset

 

Clip_335.jpg

----------------------------------------
Jamal Numan
Geomolg Geoportal for Spatial Information
Ramallah, West Bank, Palestine
0 Kudos