SVG Import broken?

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!
robertd9
Posts: 5
Joined: Fri Nov 02, 2012 10:07 am

SVG Import broken?

Postby robertd9 » Fri Nov 02, 2012 10:24 am

hi all,
im use FreeCAD since the beginnig of the year. It's great. In the last versions Import SVG don't work for me.
I get the Error message: "Exception (Fri Nov 02 11:07:14 2012): DraftToolBar instance has no attribute 'widthButton' "

OS: Windows XP
Platform: 32-bit
Version: 0.13.1535 (Git)
Branch: master
Hash: 8de40bc3a27ef081d5239d58c708158ea7d3a5fb
Python version: 2.6.2
Qt version: 4.5.2
Coin version: 3.1.0
SoQt version: 1.4.1
OCC version: 6.3.0

..... in verson Version: 0.13.0803 SVG Import is working

Best wishes,
Ralf
User avatar
shoogen
Posts: 2823
Joined: Thu Dec 01, 2011 5:24 pm

Re: SVG Import broken?

Postby shoogen » Fri Nov 02, 2012 10:42 am

In TaskView mode the gui elements are initialized on demand and can therefore not be used anymore. Please make the following change until the fix gets integrated into FreeCAD: In line 375 of Mod/Draft/importSVG.py from
self.lw = float(draftui.widthButton.value())
to
self.lw = draftui.linewidth
But this problem should also appear in ealier versions such as 0.13.0803.
Last edited by shoogen on Fri Nov 02, 2012 11:01 am, edited 1 time in total.
robertd9
Posts: 5
Joined: Fri Nov 02, 2012 10:07 am

Re: SVG Import broken?

Postby robertd9 » Fri Nov 02, 2012 10:57 am

..... really fast ;-)
with change line 375 to -->self.lw = draftui.linewidth Freecad SVG - Import works

great work shoogen
User avatar
yorik
Site Admin
Posts: 11686
Joined: Tue Feb 17, 2009 9:16 pm
Location: São Paulo, Brazil
Contact:

Re: SVG Import broken?

Postby yorik » Fri Nov 02, 2012 9:04 pm

Thanks for the fix shoogen... I just committed it.