From: Bernard <bht237@gm...> - 2013-03-31 21:17:51
I am a FreeCAD and Python beginner.
After reading and practicing with the rather nice tutorial I failed to
execute the MakeBottle.py script outside FreeCAD.
The IDE complains on the statement
import Part, FreeCAD, math
from FreeCAD import Base
with the error:
"Unresolved import: Part"
On Windows XP, I installed PyDev in the Eclipse IDE and configured the
interpreter version 2.6.5 that is provided with InkScape which works
well with the Introduction to Python at
I have configured PYTHONPATH with the external library C:\Program
It seems to find Base because the code runs fine if I comment out
relevant Part code: "FreeCAD 0.13, Libs: 0.13R1828"
So what can I do to solve this?
My idea is to work with Python files outside FreeCAD to get the IDE
support and let them save generated objects that I can load into
FreeCAD. Not sure whether this is a good workflow for designing
programmatically, so I would appreciate any comments on this as well.
I think you need to do "import FreeCAD" first. This is important because
importing FreeCAD also imports/sets the paths
to its submodules, so after that, importing the other modules such as Part
and Base (which are submodules of FreeCAD)
should work right away.