Cannot import 2D DXF or DWG files

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
onebigfish
Posts: 21
Joined: Mon Oct 20, 2014 2:41 pm

Cannot import 2D DXF or DWG files

Post by onebigfish »

Hello,

I am new to FreeCAD. I am familiar with 2-D drawing using AutoCAD LT and DraftSite. I want to import drawings I have done in DraftSite. I saved the drawings in R2000-2002 in both DXF and DWG. I installed the converter and manually set the path to the executable.

When I import the drawings into FreeCAD, I get nothing. I have tried a few different drawings and ended up with the same result. What is wrong, or what am I doing wrong?

This is an example of the output in the Python console.

Code: Select all

>>> Gui.activateWorkbench("DraftWorkbench")
>>> import importDWG
>>> importDWG.insert("D:/Desktop/TEMP/33034900.dwg","Unnamed")
>>> Gui.SendMsgToActiveView("ViewFit")
This is my system information.
OS: Windows 7
Word size: 64-bit
Version: 0.14.3700 (Git)
Branch: releases/FreeCAD-0-14
Hash: 32f5aae0a64333ec8d5d160dbc46e690510c8fe1
Python version: 2.7.6
Qt version: 4.8.5
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.6.0
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Cannot import 2D DXF or DWG files

Post by quick61 »

Try exporting in R12 or R14 DXF from DraftSight. You'll probably have batter luck.

It's a shame that Dassault Systèmes didn't include IGES import/export with the program. :roll:

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
onebigfish
Posts: 21
Joined: Mon Oct 20, 2014 2:41 pm

Re: Cannot import 2D DXF or DWG files

Post by onebigfish »

Thanks for your reply Mark. I've tried exporting to DXF and DWG in the R12 and R14 versions, but got the same result.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Cannot import 2D DXF or DWG files

Post by quick61 »

Would you mind posting an example DXF file that is not working. Being exported in R12, there shouldn't be any real problems.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
onebigfish
Posts: 21
Joined: Mon Oct 20, 2014 2:41 pm

Re: Cannot import 2D DXF or DWG files

Post by onebigfish »

Certainly. Here is one of them.
Attachments
33034900.zip
Saved as R12
(163.52 KiB) Downloaded 55 times
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Cannot import 2D DXF or DWG files

Post by quick61 »

Use R12 or R14 ASCII, don't use binary. Sorry, should of mentioned that before. The dimensions will not all work, but it looks like everything else will.
This post made with 0.0% Micro$oft products - GOT LINUX?
onebigfish
Posts: 21
Joined: Mon Oct 20, 2014 2:41 pm

Re: Cannot import 2D DXF or DWG files

Post by onebigfish »

Thanks very much. It seems like R12 is the only one that works reliably with one of the particular drawings. The other ones do not work, or do not produce desirable results.

Is it that FreeCAD does not import any versions higher, or is it that DraftSight does not export them properly?
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Cannot import 2D DXF or DWG files

Post by quick61 »

onebigfish wrote:Thanks very much. It seems like R12 is the only one that works reliably with one of the particular drawings. The other ones do not work, or do not produce desirable results.

Is it that FreeCAD does not import any versions higher, or is it that DraftSight does not export them properly?
Yes. The real problem IMO is the screwed up and very murky exchange format known as DXF. I really don't use it much beyond trying to help those in this forum. Perhaps others that are more informed about the workings of the DXF format will chime in here and be able to help you out more.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Cannot import 2D DXF or DWG files

Post by jmaustpc »

LibreCAD
Version: master
SCM Revision: 2.0.2
can not open that dxf file either.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Cannot import 2D DXF or DWG files

Post by NormandC »

The file opened in DraftSight on Windows. I saved it back to R2000 ASCII DXF and was able to open it in FreeCAD, but all text and dimensions are gone, only the geometry (3 orthographic views) is visible.
Post Reply