Accessing FreeCAD using an external IDE
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
-
- Posts: 27
- Joined: Tue Jul 06, 2010 7:46 am
Accessing FreeCAD using an external IDE
I would like to access FreeCAD with an external IDE like eric , so instead of scripting in the python console window i will be able to have an external editor ?
how do i set it ?
thanks
kianwee
how do i set it ?
thanks
kianwee
Re: Accessing FreeCAD using an external IDE
If the gui is not up, its easy. Just load FreeCAD as python module.
With the gui up its bit more complicated. Because the event loop is runing.
That means the control gets allways from the event loop to the script.
Werner experimented a bit with such set ups I think....
We could think of some kind of socket we open in FreeCAD which recive
scripting commands and feed it into the event loop. But thats also a big
security hole...
With the gui up its bit more complicated. Because the event loop is runing.
That means the control gets allways from the event loop to the script.
Werner experimented a bit with such set ups I think....
We could think of some kind of socket we open in FreeCAD which recive
scripting commands and feed it into the event loop. But thats also a big
security hole...

Stop whining - start coding!
-
- Posts: 27
- Joined: Tue Jul 06, 2010 7:46 am
Re: Accessing FreeCAD using an external IDE
yup i tried without the gui and it is working well. hmnnn .... just have to settle for the no gui first or just script in the python console . thanks
-
- Posts: 27
- Joined: Tue Jul 06, 2010 7:46 am
Re: Accessing FreeCAD using an external IDE
I am trying to write a freecad function with an external IDE eclipse , I have appended the path /usr/lib/freecad/lib , /usr/lib/freecad/mod, /usr/lib/freecad/mod/Part
hoping to get the autocompletion of the various functions and module of freecad. However, it doesnt seem to be working properly. attached below is a screenshot of the autocomplete in eclipse it seems to give me some weird function instead of the normal makeBox() function that i wanted .
hoping to get the autocompletion of the various functions and module of freecad. However, it doesnt seem to be working properly. attached below is a screenshot of the autocomplete in eclipse it seems to give me some weird function instead of the normal makeBox() function that i wanted .
- Attachments
-
- Screenshot-1.jpg (121.3 KiB) Viewed 5196 times
Re: Accessing FreeCAD using an external IDE
The question is what can we do about it? Its a question for Eclipse....
Stop whining - start coding!
Re: Accessing FreeCAD using an external IDE
It seems that this is not the FreeCAD Part module. What module path is displayed when doing a "print Part"?
-
- Posts: 27
- Joined: Tue Jul 06, 2010 7:46 am
Re: Accessing FreeCAD using an external IDE
I somehow manage to solve it i guess. so instead of :
but the autocompletion is still shaky, for e.g. the autocompletion does not work for the Base module and also for the topological data:
Just wondering anyone went thru this issue before. thanks anyway
i did :import Part
from FreeCAD import Part
but the autocompletion is still shaky, for e.g. the autocompletion does not work for the Base module and also for the topological data:
Just wondering anyone went thru this issue before. thanks anyway
- Attachments
-
- Screenshot.jpg (131.82 KiB) Viewed 5186 times
Re: Accessing FreeCAD using an external IDE
Maybe Eclipse doesn't like it that you set the sys.path inside the script in order to load FreeCAD there. I guess there must be a way where you can set permanently the path to FreeCAD inside the IDE.
- Bad Blue Bull
- Posts: 9
- Joined: Mon Aug 26, 2019 12:22 pm
Re: Accessing FreeCAD using an external IDE
Yeah, please I'd like it very much. Simple thing that I want: I use Emacs to write a script file, then send a command to FreeCAD to import this script.jriegel wrote: ↑Tue Jul 06, 2010 8:35 am If the gui is not up, its easy. Just load FreeCAD as python module.
With the gui up its bit more complicated. Because the event loop is runing.
That means the control gets allways from the event loop to the script.
Werner experimented a bit with such set ups I think....
We could think of some kind of socket we open in FreeCAD which recive
scripting commands and feed it into the event loop. But thats also a big
security hole...![]()
Socket can be closed by default, no problem there.
x64, Slackware 14.2, Linux 4.4.38.