mozman / ezdxf

Python interface to DXF
https://ezdxf.mozman.at
MIT License
912 stars 191 forks source link

I didn't do anything, but the dimension was changed. #1147

Closed xbdr419 closed 1 month ago

xbdr419 commented 1 month ago

Describe the bug Read the file and save it directly as a new document, In the saved new.dxf document, the text position changed when I adjusted the dimension I don't see this in the original file, so I suspect something was changed when I saved it.

Looking forward to fixing this and keeping it the same as the original file.

code

f = 'test.dxf'
doc = ezdxf.readfile(f)
doc.saveas('new.dxf')

video

https://github.com/user-attachments/assets/d18dbab9-0451-44f0-a50c-cf1539316b48

test file test.zip

mozman commented 1 month ago

This is AutoCAD specific behavior and you have to know which DIM variable controls this specific behavior. I don't know it and there is no official or complete documentation of all DIM variables.

xbdr419 commented 1 month ago

image

image

Thanks,according to your tips, I found these parameters in the exported new.dxf, as shown: the standard is the modified style, and the parameters in [样式替换] are the original style, I change the parameters in standard to the parameters in [样式替换], and it's normal. so, That should be the problem.

xbdr419 commented 1 month ago

Will this be fixed please?