maybe an easy to answer question, but i haven't figured it out yet with the available sources. I successfully installed FreeCAD v0.18. As i want to use FreeCAD with an external python script, i need to "import" FreeCAD in my Visual Studio Code, i tried two approaches:
1)
using the wiki post: https://wiki.freecadweb.org/Embedding_FreeCAD
Code: Select all
sys and sys.path.append(G:/Program Files/FreeCAD/lib)
import FreeCAD as App
2)
created a environment file .env and defined (as described in post https://forum.freecadweb.org/viewtopic.php?t=45919) the paths there as follows:
Code: Select all
FREECAD_LIB = G:/Program Files/FreeCAD/lib
FREECAD_MOD = G:/Program Files/FreeCAD/Mod
PYTHONPATH = ${FREECAD_LIB}:${FREECAD_MOD}:${PYTHONPATH}
With both approaches, VSC does not find the FreeCAD to work with.
Thanks in advance