Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have tried using dxf2shp converter in QGIS but the text in dxf file is being lost during the conversion process, despite selecting export text labels.

I would be grateful if someone can help me convert the .dxf to .shp file without losing data.

You can get dxf data that I am experimenting with from here

share|improve this question
add comment

3 Answers

Hey If it is a case that you want to load it into Qgis and display the lables just do it that way there is no need to put as shapefile.

Sorry on further reflection and looking at the data. Why not load as dxf and split vector layer. load them in as shapes then.

I seem to get most text come through.

Or perhaps split the layers in autocad and save as seperate dxfs. I think you problem is when you try dxf to shp it only allows for polygons polylines or points not all 3. you have polyline/gons and points. so put points on seperate layer.

Of course if you have split dxf into shapes then convert polygon to points.

you may want to merge shapefiles to one at the end but dont see the point as there will be issues.

share|improve this answer
add comment

Opening the dxf with Add Vector layer and labelling with text datafield gives almost the same as Autodesk Design Review:

enter image description here

enter image description here

The DXF file contains points and polygons in the same layer. This is not allowed in shapefiles. That is why you can not save it as a shapefile.

Exporting as kml will work, as this format supports different geometry types. You have to set NameField=Text in the Data Source Field to preserve the text into the Name field for labelling.


EDIT

You can export the data as lines shapefile, and ignore the error messages. In a second run, you can export the labelling points by adding SHPT=POINTS in the Layer field, ignoring again the error messages. Load both shapefiles into QGIS manually, label the point file with the Text field, and set the point symbol to zero size.

share|improve this answer
    
that is what i said –  Gerald May 16 '13 at 15:37
    
It solved my problem. I've opened the dxf with a vector layer and labelled with text data field, It works. Thank you all, This is an amazing community!! –  user18197 May 17 '13 at 3:02
add comment

i tried with QGIS 1.8.0 on Ubuntu 12.04 LTS (x86_64) with dxf plugin and only a single attribute is getting copied to shapefile. From the attribute data of converted shapefile it seems like dxf converter plugin just adding a new attribute field myid to every feature rather than copying data from source dataset. It will be good to inform QGIS developers may be submit a bug on QGIS issue tracking

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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