Draft Module No Longer Functions [solved]

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!
User avatar
ppemawm
Posts: 540
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Draft Module No Longer Functions [solved]

Postby ppemawm » Thu Aug 08, 2013 2:19 pm

I somehow lost my Draft module and receive the following error if selecting from the toolbar:

local variable 'DraftTools' referenced before assignment
Traceback (most recent call last):
File "C:\Program Files (x86)\FreeCAD0.13\Mod\Draft\InitGui.py", line 197, in Initialize
self.appendToolbar(str(DraftTools.translate("draft","Draft creation tools")),self.cmdList)

The Draft drop down menu does not show and the toolbars are missing

I uninstalled and reinstalled FreeCad but still had the error. I also searched the forum and found reference to a similar situation but did not understand how to fix it:
viewtopic.php?f=3&t=3686&p=28801&hilit= ... ent#p28811

Can anyone please help?

OS: Windows 7
Platform: 32-bit
Version: 0.13.1828
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
Last edited by ppemawm on Thu Aug 08, 2013 4:08 pm, edited 1 time in total.
"It is a poor workman who blames his tools..." ;)
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: Draft Module No Longer Functions

Postby NormandC » Thu Aug 08, 2013 2:33 pm

There's a folder that contains 2 configuration files: system.cfg and user.cfg. On Linux the folder is named .FreeCAD (the dot at the front makes it a hidden folder).

In another "FreeCAD" folder, there's a "FreeCAD.conf" file.

On Windows I have no idea where they are located. If you can locate them, delete them - FreeCAD will recreate those files with the default settings the next time it launches. This will remove your own settings.

That's what I did to fix the problem you have.

If you do find these files, please tell us where they are located on Windows 7. Then I will know for the next time someone needs it.
oldestfox
Posts: 98
Joined: Sun Jun 30, 2013 2:15 pm
Location: Southeast Texas, USA

Re: Draft Module No Longer Functions

Postby oldestfox » Thu Aug 08, 2013 3:17 pm

normandc wrote: If you do find these files, please tell us where they are located on Windows 7
I don't know about Win7, but in WinXP they are located here:

C:\Documents and Settings\Administrator\Application Data\FreeCAD

Of course the Drive and User will change. And I don't know if MS has renamed the folders for the same use or not. Probably so. :o
User avatar
ppemawm
Posts: 540
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: Draft Module No Longer Functions--[solved]

Postby ppemawm » Thu Aug 08, 2013 4:03 pm

Thanks guys.

I found the files using Windows Search using "Freecad", deleted them, and, voila, the Draft Workbench is back, and it functions!
Of course, I lost all of my preferences and custom toolbars, but a small price to pay for getting back to work.

In Windows 7:

.Freecad file was in C:/Users/.../AppData/Local/Freecad/Freecad
sys.cfg and user.cfg are in C:/Users/.../AppData/Roaming/Freecad
where /.../ is whatever you have named your computer

Who says we greybeards can't learn something new.
Now, if I can just remember it for next time...
"It is a poor workman who blames his tools..." ;)