Drawing workbench problem

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!
archang
Posts: 69
Joined: Wed Aug 27, 2014 5:22 am

Drawing workbench problem

Postby archang » Tue Jun 30, 2015 9:09 am

I insert new drawing, click Page and export to dxf file, when i open the dxf file, no 2D graphics and the following error occurred:
01.JPG
01.JPG (191.52 KiB) Viewed 1135 times
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/free-cad-code/Mod/Draft/importDXF.py", line 1471, in open
processdxf(doc,filename)
File "/opt/free-cad-code/Mod/Draft/importDXF.py", line 994, in processdxf
drawing = dxfReader.readDXF(filename)
File "/opt/free-cad-code/Macro/dxfReader.py", line 364, in readDXF
drawing = sm.run(infile)
File "/opt/free-cad-code/Macro/dxfReader.py", line 95, in run
(newState, cargo) = handler(cargo)
File "/opt/free-cad-code/Macro/dxfReader.py", line 295, in start_section
obj = handleBlock(obj, infile) # we need to find all there contents
File "/opt/free-cad-code/Macro/dxfReader.py", line 236, in handleBlock
if obj.type == 'block':
<type 'exceptions.AttributeError'>: 'str' object has no attribute 'type'


OS: Ubuntu 14.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.4806 (Git)
Branch: master
Hash: a7c346606fe588b0f2faa251e3ae72e9ef833184
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.7.0
S-A-1.stp
(190.69 KiB) Downloaded 24 times
triplus
Posts: 8761
Joined: Mon Dec 12, 2011 4:45 pm

Re: Drawing workbench problem

Postby triplus » Tue Jun 30, 2015 12:16 pm

I did quick test and it works for me. Try to delete DXF libraries from your macro folder and let FreeCAD download them again (Draft WB -> Preferences -> Import-Export -> DXF tab (enable option Automatic update).

If that won't work attach .fcstd file.
archang
Posts: 69
Joined: Wed Aug 27, 2014 5:22 am

Re: Drawing workbench problem

Postby archang » Wed Jul 01, 2015 1:08 am

I've tried, the same error occurred!

I use other freecad version, no 2D graphics and the following error occurred:

OS: Ubuntu 14.04.2 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5144 (Git)
Build type: None
Branch: master
Hash: 165261e3584553481209d80e9e0e0332db569959
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

DXF libraries not found. Trying to download...
downloading https://raw.githubusercontent.com/yorik ... olorMap.py ...
downloading https://raw.githubusercontent.com/yorik ... Objects.py ...
downloading https://raw.githubusercontent.com/yorik ... Library.py ...
downloading https://raw.githubusercontent.com/yorik ... fReader.py ...

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/freecad/Mod/Draft/importDXF.py", line 1471, in open
processdxf(doc,filename)
File "/usr/lib/freecad/Mod/Draft/importDXF.py", line 994, in processdxf
drawing = dxfReader.readDXF(filename)
File "/home/archang/.FreeCAD/dxfReader.py", line 364, in readDXF
drawing = sm.run(infile)
File "/home/archang/.FreeCAD/dxfReader.py", line 95, in run
(newState, cargo) = handler(cargo)
File "/home/archang/.FreeCAD/dxfReader.py", line 295, in start_section
obj = handleBlock(obj, infile) # we need to find all there contents
File "/home/archang/.FreeCAD/dxfReader.py", line 236, in handleBlock
if obj.type == 'block':
<type 'exceptions.AttributeError'>: 'str' object has no attribute 'type'
archang
Posts: 69
Joined: Wed Aug 27, 2014 5:22 am

Re: Drawing workbench problem

Postby archang » Wed Jul 01, 2015 1:13 am

.fcstd file
test.fcstd
(25.59 KiB) Downloaded 23 times
archang
Posts: 69
Joined: Wed Aug 27, 2014 5:22 am

Re: Drawing workbench problem

Postby archang » Wed Jul 01, 2015 1:16 am

.dxf file
bbb.dxf
(44.94 KiB) Downloaded 34 times
triplus
Posts: 8761
Joined: Mon Dec 12, 2011 4:45 pm

Re: Drawing workbench problem

Postby triplus » Wed Jul 01, 2015 1:32 am

I see the problem now as it's not about exporting but about importing back again the exported DXF file. Yes there is an issue involved and i get the same error if i try to import attached file in FreeCAD. Probably something Yorik will take a look at when he gets the chance.

Until then you can use LibreCAD to view your DXF file.
archang
Posts: 69
Joined: Wed Aug 27, 2014 5:22 am

Re: Drawing workbench problem

Postby archang » Wed Jul 01, 2015 4:07 am

I can use LibreCAD to view the dxf file in Ubuntu, but i can not use AutoCAD、BricsCAD、DWGeditor、DraftSight to view the dxf file in Windows.

It seems to have a problem about exporting.
User avatar
yorik
Site Admin
Posts: 11567
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: Drawing workbench problem

Postby yorik » Wed Jul 01, 2015 2:25 pm

Indeed there seems to be a problem at export... issue #2177
archang
Posts: 69
Joined: Wed Aug 27, 2014 5:22 am

Re: Drawing workbench problem

Postby archang » Thu Jul 02, 2015 1:08 am

Another problem: after export dxf file, the hidden lines is missing. (use LibreCAD to view)
01.JPG
01.JPG (191.52 KiB) Viewed 943 times
02.JPG
02.JPG (81.89 KiB) Viewed 943 times
archang
Posts: 69
Joined: Wed Aug 27, 2014 5:22 am

Re: Drawing workbench problem

Postby archang » Thu Jul 02, 2015 1:22 am

Enlarged isometric view, there are some incorrect graphics. (red circle place)
03.JPG
03.JPG (137.14 KiB) Viewed 941 times