2

I am trying to run FreeCAD modules from a python script. Here is the code I have written to import the FreeCAD modules according with this tutorial" (eventhoug I don't have any FreeCAD.dll installed on my HD):

FREECADPATH = "C:\\Program Files (x86)\\FreeCAD 0.16\\bin"
import sys
sys.path.append(FREECADPATH)

import FreeCAD
import Part
import Mesh
...then the FreeCAD commands

But i got the following error:

" import Part ImportError: No module named Part"

I also tried with a 64bit version of the FreeCAD

C:\Program Files\FreeCAD 0.16\bin

Any suggestion?

drSlump
  • 307
  • 4
  • 16
  • can you list the contents of `C:\\Program Files\\Program Files (x86)\\bin` in the question ? it is possible that you need a 64-bit version of python to load a 64 bit DLL. – Jean-François Fabre Sep 15 '16 at 09:30
  • @Jean-FrançoisFabre sorry there was a typo in the question (wrong folder). Do you mean all the file contained in the folders? – drSlump Sep 15 '16 at 09:40
  • So `import FreeCAD` was fine and only `Part` gave an error? – airdas Jun 14 '17 at 08:56

0 Answers0