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

Getting corrupted file with dxfLibrary even with sample code (when directly running the dxfLibrary). #20

Open
ruben-ksdm opened this issue Feb 20, 2019 · 1 comment

Comments

@ruben-ksdm
Copy link

When running dxfLibrary with python dxfLibrary.py I'm getting corrupted file. (Can't post here, because github is not allowing).
So what's wrong? How can I generate DXF files with dxfLibrary? Is this related to versions of AutoCAD?
If you know where is the problem but can't get time to fix it, then please just show me the direction and I'll try to fix the problem (because I get corrupted files using my scripts too).

@ruben-ksdm ruben-ksdm changed the title Getting invalid file with dxfLibrary even with sample code (when directly running the dxfLibrary). Getting corrupted file with dxfLibrary even with sample code (when directly running the dxfLibrary). Feb 20, 2019
@ruben-ksdm
Copy link
Author

Ok, when I remove some code lines, I get normal file, but when I add only one dimension by d.append(Dimension((0,0,0), (0,0,0), (30,0,0))) (and yes, maybe I'm using Dimensions in the wrong way, because there is no documentation for this), I get corrupted file...
So I'm now trying to understand how is AutoCAD saving dimensions in the file and I have found, that it is using another format for that.
I get this with the dxfLibrary,

DIMENSION
  8
0
 3
Standard
 70
1
 10
15.0
 20
15.0
 30
0.0
 13
0.0
 23
0.0
 33
0.0
 14
...

And this with AutoCAD.

DIMENSION
  5
80
330
6F
100
AcDbEntity
  8
0
  6
Continuous
100
AcDbDimension
280
     0
  2
*D1
 10
7.226812686351081
 20
0.2700349030479145
 30
0.0
 11
3.617280040857167
 21
...

So what can I do now? Maybe I have to write my own tool to create dimensions in the dxf file? Because I can't find dimensions feature in any other dxf exporting tool for python (maybe I have to find in other languages too...).

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

No branches or pull requests

1 participant