[Python] Embedding FreeCAD in python script

Discussão em 'Python' iniciado por Stack, Maio 22, 2025.

  1. Stack

    Stack Membro Participativo

    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?

    Continue reading...

Compartilhe esta Página