Skip to content
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

Can't open DXF file in AutoCAD LT 2025 #85

Open
DennisJensen95 opened this issue Dec 9, 2024 · 8 comments
Open

Can't open DXF file in AutoCAD LT 2025 #85

DennisJensen95 opened this issue Dec 9, 2024 · 8 comments

Comments

@DennisJensen95
Copy link
Contributor

DennisJensen95 commented Dec 9, 2024

Hi,

I am trying to open my DXF file i have made with this SDK. But I keep getting this error:

Bad handle 0: already in use
Error in APPID Table
DXF read error on line 1120.
Invalid or incomplete DXF input -- drawing discarded.

I think it is because by default not all APPIDs for example has a handle. I am trying to convert it to R2018. Any help would be appreciated to fix it. I have tried to look at the github.com/ixmilia/dxf Dotnet package, but no luck yet.

I would like to fix it, but i think i need a pointer from you @brettfo 😊

@DennisJensen95
Copy link
Contributor Author

Oh, i found your todo that i think i need to handle here: https://github.com/ixmilia/dxf-rs/blob/main/build/table_generator.rs#L370. I am going to try and implement it, thinking i can get new handles from the drawing and add them here?

@DennisJensen95
Copy link
Contributor Author

I am encountering quite a few things trying to make it compatible with R2018, @brettfo do you have any recommendations for executing this work? My current feedback loop is, get an error from AutoCAD when loading the R2018, then check the error look at the spec here: https://help.autodesk.com/view/OARX/2024/ENU/?guid=GUID-235B22E0-A567-4CF6-92D3-38A2306D73F3 and then trying to implement it and hit next thing.

@DennisJensen95
Copy link
Contributor Author

So far the work has included the following:

  • Put handles on tables
  • Write up empty tables
  • Adjusting maintenance version to accomodate for code 90.

Now i am working with this error:

The following error was encountered while reading
in SEQEND starting at line 2306:
Class separator for class AcDbEntity expected
Invalid or incomplete DXF input -- drawing discarded.

😊

@DennisJensen95
Copy link
Contributor Author

DennisJensen95 commented Dec 10, 2024

I kinda got stuck at dictionary elements, AutoCAD saying that it needs NamedObjects dictionary... 🤔

If any smart people has knowledge of this, I would love to hear about it. Tried to add a default dictionary object, with default values. But the format was incorrect.

File lacks the NamedObject dictionary
Invalid or incomplete DXF input -- drawing discarded.

@DennisJensen95
Copy link
Contributor Author

Oh, an empty Dictionary in objects sorted it out and resolved as the "Named Object Dictionary" NOD. I am not sure if this is the correct approach, but now AutoCAD LT 2025 can load my DXF files 👍

@DennisJensen95
Copy link
Contributor Author

I will clean up and fix up the unit tests and make a PR soon 👍

@brettfo
Copy link
Member

brettfo commented Dec 10, 2024

Compatibility with AutoCAD is a large ongoing issue, but I have a C# DXF handler that has a little bit better compatibility that might offer some hints. That can be found here: https://github.com/ixmilia/dxf

@DennisJensen95
Copy link
Contributor Author

Thank you, I was looking at that repo and also ezdxf python lib. I managed to get compatability with AutoCAD, which was awesome 🚀

At least with AutoCAD LT 2025. Anyone knows how certain one can be that it works with other versions as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants