Installed version: 2.7.3.2013031601
Using FreeCAD http://www.freecadweb.org/ on Windows XP
This is an easy to install program, and the test code is easy to reproduce.
This code works when running:
import FreeCAD # @UnusedImport
from FreeCAD import Base # @UnusedImport
from FreeCAD import Part #@UnresolvedImport
def clear():
if FreeCAD.ActiveDocument is not None:
for p in FreeCAD.ActiveDocument.findObjects():
FreeCAD.ActiveDocument.removeObject(p.Label)
pass
else:
FreeCAD.newDocument()
FreeCAD.setActiveDocument("Unnamed")
FreeCAD.ActiveDocument = FreeCAD.getDocument("Unnamed")
pass
clear()
but I get errors (please see attached screen print.
Most imports actually work which suggests that the FreeCAD directory is found.
I have searched all stackoverflow.com articles but suggested solutions did not work.
I think it would be great to solve this because it seens so fundamental to me.
PYTHONPATH setting
Another script file that has more severe errors. Still runs.