Rank: Senior Member
Joined: 6/28/2008(UTC) Posts: 648
DXF's don't seem to save inch/mm units reliably. Only DXF R12 imports correctly into my CAM package, the other versions only import as inch units. All the best, Martin.
Rank: Senior Member
Joined: 2/23/2007(UTC)
Posts: 484
Thanks: 28 times Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: blowlamp DXF's don't seem to save inch/mm units reliably.
the [URL="http://www.dailyautocad.com/autocad/understanding-scale-concept-and-units-in-autocad/"]DXF/DWG format does in general not incorporate information concerning the units[/URL] used by the creator but only dimensionless coordinate values, you can call it DWG units, of the contained entities.
thus importing DXF/DWG data into a CAx application, the (assumed) unit used by the creator of the drawing must be configured manually prior the import either by selecting the unit in the program settings or sometimes being asked for during the import process.
you can of course adjust afterwards by simply checking an entity for a known length and scale appropriately.
hth,
Norbert
Rank: Senior Member
Joined: 6/28/2008(UTC) Posts: 648
Point taken Norbert, but ViaCAD does give the option to save in metric or imperial, and coupled with the fact that DXF R12 saves correctly, I thought it would neaten things up a bit if ViaCAD was consistent in its actions. All the best, Martin.
Rank: Senior Member
Joined: 2/2/2007(UTC)
Posts: 5,447
Was thanked: 502 time(s) in 353 post(s)
Originally Posted by: blowlamp DXF's don't seem to save inch/mm units reliably. Only DXF R12 imports correctly into my CAM package, the other versions only import as inch units. All the best, Martin.
Hi Martin
If you can zip and send me a small file not exporting to the correct units that would help us track this down. Send to
[email protected] .
To test our DWG files, we validate using AutoDesk's DWG TrueView.
Tim
Tim Olson IMSI Design/Encore
Rank: Senior Member
Joined: 2/23/2007(UTC)
Posts: 484
Thanks: 28 times Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: blowlamp Point taken Norbert, but ViaCAD does give the option to save in metric or imperial...
ah, understand, have tried to reproduce by exporting a 1" square to DXF 2000 from SFX v5.5.831 Win with no success, exports "1" with imperial unit (inch) and "25.4" with metrical unit (mm) selected.
Thus maybe already fixed/vanished for recent releases?
To check the DXF files, I validate using a [URL="http://www.ultraedit.com/"]text editor[/URL].
Norbert
Rank: Senior Member
Joined: 4/1/2007(UTC) Posts: 1,583
Was thanked: 2 time(s) in 2 post(s)
Originally Posted by: posh.de To check the DXF files, I validate using a [URL="http://www.ultraedit.com/"]text editor[/URL].
How do you do that then, Norbert? I'm curious! :D
(PS- I suppose TextEdit in OS X, for us Mac users is okay to use too?)
Rank: Senior Member
Joined: 2/23/2007(UTC)
Posts: 484
Thanks: 28 times Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: ttrw How do you do that...
• create a single line starting at 0/0/0 and length 1" resp. 25.4mm
• export to DXF (not DWG b'cause binary)
• open with arbitrary text editor e.g. from the OS
• do a search for "LINE" (single word)
• the approx. second hit should show the definition of the line structure, something like:
Code: LINE<br> 5<br>6B<br>330<br>1F<br>100<br>AcDbEntity<br> 8<br>Layer1<br> 6<br>VOLLINIE<br> 62<br> 150<br>100<br>AcDbLine<br> 10<br>0.0<br> 20<br>0.0<br> 30<br>0.0<br> 11<br>25.4<br> 21<br>0.0<br> 31<br>0.0<br> 0<br>
• below parameter '11' (= legth) you will find *tataaa* the length :cool:
cheers,
Norbert
Originally Posted by: ttrw (PS- I suppose TextEdit in OS X, for us Mac users is okay to use too?)
P.S.: sure, or the better and free [URL="http://www.barebones.com/products/textwrangler/"]BB TextWrangler[/URL].
Rank: Senior Member
Joined: 4/1/2007(UTC) Posts: 1,583
Was thanked: 2 time(s) in 2 post(s)
yep- works in TextEdit :)
(and it didn't cost an extra $49 either :D )
ttrw attached the following image(s):
25mm line TextEdit.png
(19kb) downloaded 5 time(s). You cannot view/download attachments. Try to login or register.
Rank: Senior Member
Joined: 2/23/2007(UTC)
Posts: 484
Thanks: 28 times Was thanked: 50 time(s) in 36 post(s)
Originally Posted by: ttrw (and it didn't cost an extra $49 either :D )
yep, as
[URL="http://www.barebones.com/products/textwrangler/download.html"]free[/URL] TextWrangler (not BBEdit) too :D
Norbert
Rank: Administration
Joined: 7/29/2007(UTC)
Posts: 1,862
Thanks: 1 times Was thanked: 87 time(s) in 81 post(s)
Originally Posted by: blowlamp Point taken Norbert, but ViaCAD does give the option to save in metric or imperial, and coupled with the fact that DXF R12 saves correctly, I thought it would neaten things up a bit if ViaCAD was consistent in its actions. All the best, Martin.
Hi, Martin
Another thing that might be going on is the $Measurement header in the dxf file this header was added after version 12. Some programs (cad/cam) read the $Measurement header to help pick units when loading a file. When I export a 1" line as mm its getting converted to 25.4 in the line header that Norbert is referring to but the $Measurement header is always 0 on output. This should probably be changed to toggle to 1 for metric when outputting dxf/dwg from VC/Shark.
Try opening your dxf file and changing the 0 to 1 in the $Measurement section and see what happens in the cam program.
Regards
Jason
jdi000 attached the following image(s):
measurementheader.jpg
(37kb) downloaded 5 time(s). measurementheaderindxf.jpg
(17kb) downloaded 5 time(s). You cannot view/download attachments. Try to login or register.
Windows 11, 10
Rank: Senior Member
Joined: 6/28/2008(UTC) Posts: 648
Jason. You are a star. That indeed was the problem I was/am having and changing the setting you describe makes the CAM program switch correctly between units. So thanks to both you and Norbert for helping to pin it down. Tim, any chance of getting this update into ViaCAD Please? Thanks all, Martin.
Rank: Administration
Joined: 7/29/2007(UTC)
Posts: 1,862
Thanks: 1 times Was thanked: 87 time(s) in 81 post(s)
>>>>Martin, Glad your up and running Tim Your outputting the dxf file with the right conversion done on the geometry but are you toggling the $Measurement header? I think this is only toggling from english to metric its not defining units but measurement system, AutoCAD uses this more for dimensioning I think, but it seems other software is using it to help determine english vs metric systems to decide to apply any conversions to geometry. Thanks Jason
Windows 11, 10
Rank: Senior Member
Joined: 2/2/2007(UTC)
Posts: 5,447
Was thanked: 502 time(s) in 353 post(s)
Hi Jason >>but are you toggling the $Measurement header? No I was not. I added in code to change this field based on metric or english and now testing with TrueView for all the different cases. So far it seems to work very well. Many thanks Jason! Tim
Tim Olson IMSI Design/Encore
Rank: Senior Member
Joined: 6/28/2008(UTC) Posts: 648
Working well so far in 833:) Thanks for fixing, Tim. Martin.
Rank: Senior Member
Joined: 2/2/2007(UTC)
Posts: 5,447
Was thanked: 502 time(s) in 353 post(s)
Originally Posted by: blowlamp Working well so far in 833:) Thanks for fixing, Tim. Martin.
Excellent, thanks for confirming.
FYI in build 834 we've got another big improvement coming to the DWG translators regarding improved support for multi-line text from AutoCAD.
Tim
Tim Olson IMSI Design/Encore
Rank: Administration
Joined: 7/29/2007(UTC)
Posts: 1,862
Thanks: 1 times Was thanked: 87 time(s) in 81 post(s)
Originally Posted by: Tim Olson Excellent, thanks for confirming. FYI in build 834 we've got another big improvement coming to the DWG translators regarding improved support for multi-line text from AutoCAD. Tim
Excellent!!
Windows 11, 10
Forum Jump
Punch! CAD
ViaCAD & Shark
- News and Announcements
- General
- 2D Drafting
- Surface Modeling
- Solid Modeling
- Subdivision Modeling
- Rendering & Display
- Import/Export
- Tips and Tutorials
- Suggestions
- Gallery
- PowerPack
- Punch Lounge
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.