Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#7078 closed defect (fixed)

DXF: OGR-created files containing a "Defpoints" layer can't be opened in AutoCAD

Reported by: Alan Thomas Owned by: warmerdam
Priority: normal Milestone:
Component: OGR_SF Version: svn-trunk
Severity: minor Keywords: dxf
Cc:

Description

Upon running the following command, where in.dxf contains objects on the "Defpoints" layer:

ogr2ogr -f "DXF" -overwrite out.dxf in.dxf

out.dxf can't be opened in AutoCAD. The following error is issued by AutoCAD:

Error in LAYER Table
Invalid AcDbLayerTableRecord plot flag for DEFPOINTS layer on line 1252.
Invalid or incomplete DXF input -- drawing discarded.

This can be resolved by adding

290
     0

in the LAYER table entry for the "Defpoints" layer.

"Defpoints" is a special AutoCAD layer that is never supposed to be displayed, so AutoCAD seems to insist that a layer with this name shouldn't be plotted.

Probably a minor issue as it may well only happen when round-tripping DXF files, which is an unusual use case.

Attachments (1)

defpoints-layer.dxf (7.6 KB) - added by Alan Thomas 8 months ago.

Download all attachments as: .zip

Change History (3)

Changed 8 months ago by Alan Thomas

Attachment: defpoints-layer.dxf added

comment:1 Changed 8 months ago by Even Rouault

Resolution: fixed
Status: newclosed

In 40365:

DXF: on write side, force 'defpoints' layer to be non-displayed (fixes #7078)

comment:2 Changed 8 months ago by Even Rouault

I've not Autocad to test, so I'd appreciate if you could confirm that it fixes the issue

Note: See TracTickets for help on using tickets.