Hi,
Operation system: Archlinux
QCAD: 3.27.6.0 (3.27.6) Professional
I'm using the command line tools bbox to determine the drawing size of a drawing. This is working great, but I do receive some dxf files, where the drawing unit was (accidentally) changed from millimeter to centimeter by the designer. bbox always returns the size in the unit as it was used in the drawing - which is correct, but not wanted by me.
I can see the drawing unit through the GUI with the following steps:
1. Edit → Drawing Preferences
2. General → Drawing Unit
I've attached two samples:
1. car-in-cm.dxf → drawing unit was set to centimeter
2. car-in-mm.dxf → same drawing, but designer changed to drawing unit to millimeter
Using bbox the following sizes get returned:
car-in-cm.dxf: 22.468989987273325/9.728374755022282
car-in-mm.dxf: 224.68989987273324/97.28374755022281
Is there a way to get the used drawing unit from a dxf (or let bbox return the size incl. drawing unit) through command line so I'm somehow able to convert the unit manually?
Thank you very much!
Best regards
- Mathias
[solved] Get drawing unit from drawing through command line
Moderator: andrew
Forum rules
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
Always indicate your operating system and QCAD version.
Attach drawing files and screenshots.
Post one question per topic.
-
- Newbie Member
- Posts: 4
- Joined: Thu Aug 04, 2022 8:06 am
[solved] Get drawing unit from drawing through command line
- Attachments
-
- car-in-mm.dxf
- (190.35 KiB) Downloaded 161 times
-
- car-in-cm.dxf
- (191.25 KiB) Downloaded 160 times
Last edited by mrohnstock on Wed Aug 10, 2022 8:53 am, edited 1 time in total.
Re: Get drawing unit from drawing through command line
Hi,
A shot in the dark.
Textual in the dxf file: $INSUNITS
For the mm drawing that is 70 ... 4
And for the cm drawing that is 70 ... 5
https://documentation.help/AutoCAD-DXF/ ... 9-7a6f.htm
Regards,
CVH
A shot in the dark.
Textual in the dxf file: $INSUNITS
For the mm drawing that is 70 ... 4
And for the cm drawing that is 70 ... 5
https://documentation.help/AutoCAD-DXF/ ... 9-7a6f.htm
Regards,
CVH
-
- Newbie Member
- Posts: 4
- Joined: Thu Aug 04, 2022 8:06 am
Re: Get drawing unit from drawing through command line
Thanks CVH, on some checks, this looks promising .
Issue is solved
Issue is solved