New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export to DXF : "AutoCAD Message: Copy to clipboard failed" #6013
Comments
CC @atlight |
See #1213 (comment). |
@jbp35 thanks so much for debugging this!
Yes, ironically enough, AutoCAD's DXF reader is pretty lousy. We should fix this in GDAL. If you make a pull request against https://github.com/OSGeo/gdal/blob/master/data/trailer.dxf I'll merge it. |
@atlight You welcome, this has been quite a pain for me for a long time and couldn't take it any more! I created a PR with the proposed fix: Just to mention, I just code occasionally for fun and don't have much understanding of what's actually going on here. So a good review is definitely needed before merging this. Thanks! |
Expected behavior and actual behavior.
After exporting any file to DXF with GDAL, it is not possible to copy geometry in AutoCAD and causes the following error message: "AutoCAD Message: Copy to clipboard failed"
Steps to reproduce the problem.
Operating system
All operation systems
GDAL version and provenance
GDAL 3.5.0
Troubleshooting
This issue seems to be caused by an Hard-owner ID/handle (F) pointing to a missing dictionary in the generated file.
Defining this missing dictionary manually at the end of the file fixes the issue:
0 ACDBPLACEHOLDER 5 F 102 {ACAD_REACTORS 330 E 102 } 330 E
Original DXF file created using ogr2ogr (renamed as TXT):
[export_from_gdal_with error.txt]
(https://github.com/OSGeo/gdal/files/9044889/export_from_gdal_with.error.txt)
Modified DXF file with added dictionary at the end (renamed as TXT):
export_from_gdal_with dictionnary added.txt
Here is the output of Audit command in Autocad which helped me track the origin of the issue:
The text was updated successfully, but these errors were encountered: