Importing FreeCAD in Dynamo Python

Need help, or want to share a macro? Post here!
User avatar
cnirbhay
Posts: 116
Joined: Wed Aug 17, 2016 4:24 pm

Re: Importing FreeCAD in Dynamo Python

Postby cnirbhay » Fri Sep 07, 2018 7:12 pm

sgrogan wrote:
Fri Sep 07, 2018 4:58 pm
I don't know another way to get the compiler used to build python.
I suspect Dynamo's Python 2.7 is built with VC9, this is what standard Python is built with.
FreeCAD's python is built with VC12, so the 2 python's would be incompatible as they would try load different CRT's.

Maybe you can get some info from Dynamo's Help About or the like?

EDIT: I just discovered that Dynamo uses Iron Python and doesn't work with CPython compiled extensions (like FreeCAD.pyd)
see here for ex. https://forum.dynamobim.com/t/numpy-for ... cript/5394 (i.e. numpy.pyd)

So you will only be able to use pure python modules (.py files) with Dynamo apparently.
Oh, I see. Well, thank you so much for a nice explanation. I'll find out if something can be done. :-)
User avatar
looo
Posts: 3371
Joined: Mon Nov 11, 2013 5:29 pm

Re: Importing FreeCAD in Dynamo Python

Postby looo » Fri Sep 07, 2018 8:10 pm

is ironpython compatible with cpython?
User avatar
sgrogan
Posts: 5887
Joined: Wed Oct 22, 2014 5:02 pm

Re: Importing FreeCAD in Dynamo Python

Postby sgrogan » Fri Sep 07, 2018 9:03 pm

looo wrote:
Fri Sep 07, 2018 8:10 pm
is ironpython compatible with cpython?
From what I could gather for pure python, cpython to ironpython yes, ironpython to cpython usually.
For compiled extensions never.
From my link above at the end it is mentioned that Dynamo is removing pip support, I wonder why ;)
User avatar
looo
Posts: 3371
Joined: Mon Nov 11, 2013 5:29 pm

Re: Importing FreeCAD in Dynamo Python

Postby looo » Sat Sep 08, 2018 7:39 am

It's a pity Dynamo is developed in c#... Hopefully there will be a qt based alternative available some day.