I can import LineStrings, polygons, annotations from a DXF file into ArcMap (and arcpy) but I can't import Points from the same DXF file (neither with arcpy).

No error is reported, simply no features are loaded.

I am simply using the 'Add data' button in the GUI, then I select the layer in the DXF file. When I do it this way, I can 'Zoom to layer' to the correct extent of the layer, but nothing is displayed.

The DXF file version seems to be R12

And with arcpy:

arcpy.FeatureClassToShapefile_conversion(file + os.sep + "Point", self.temp_folder)

Everything works fine in QGIS 2.16.

Any idea how to make this possible?

  • 1
    What happens? What is the process you follow to import the points? Please edit your question to include as much information as possible about what you've tried. – Midavalo Sep 12 '16 at 2:47
  • You currently have an ArcPy tag. If you are using ArcPy then please include a code snippet to show us what you have tried and where you are stuck. – PolyGeo Sep 12 '16 at 7:20
  • 1
    Have you tried CadToGeodatabase_conversion ? – klewis Sep 12 '16 at 19:22
  • Yes. Same problem. – Gob Tron Sep 12 '16 at 19:29

I found out what was wrong... Turns out that the layer I really wanted to load was the Annotation.

When loading the DXF file in QGIS, there is a choice of two layer: Point and linestring. In ArcMap there are: Point, Annotation, Linestring, Polygon. The points in QGIS is the layer I want. In ArcMap, the same layer is named Annotation and is displayed differently (annotations instead of points). Each annotation has a shape associated (point).

So I just had to change Point with Annotation in the python code:

arcpy.FeatureClassToShapefile_conversion(file + os.sep + "Point", self.temp_folder)

Should be:

    arcpy.FeatureClassToShapefile_conversion(file + os.sep + "Annotation", self.temp_folder)
  • I am having the same problem from CAD to GDB – ziggy Sep 14 '16 at 12:50
  • Whats is os.sep? – ziggy Sep 14 '16 at 12:50
  • 'os.sep' is the path separator depending on the OS. In Windows it is '\' and Linux is '/'. Very useful. – Gob Tron Sep 14 '16 at 13:26
  • What is the problem you have? Since I just resolved it, maybe I can help. – Gob Tron Sep 14 '16 at 13:27
  • You can read about Python's os module here: docs.python.org/2/library/os.html – Gob Tron Sep 14 '16 at 14:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.