use freecad python module of Windows dev version

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: use freecad python module of Windows dev version

Post by sgrogan »

Maybe try this?

Code: Select all

>>> import platform
>>> print(platform.sys.version)
3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 11:48:23) [MSC v.1900 64 bit (AMD64)]
>>> 
The output here is for your version of FreeCAD's python.
"fight the good fight"
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: use freecad python module of Windows dev version

Post by bernd »

sgrogan wrote: Tue Aug 21, 2018 11:07 am Maybe try this?

Code: Select all

>>> import platform
>>> print(platform.sys.version)
3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 11:48:23) [MSC v.1900 64 bit (AMD64)]
>>> 
The output here is for your version of FreeCAD's python.

Allplan

Code: Select all

3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)]

The FreeCAD I try to import

Code: Select all

3.6.6 | packaged by conda-forge | (default, Jul 26 2018, 11:48:23) [MSC v.1900 64 bit (AMD64)]
so this should be fine IMHO


I'd be courious what Werners tools will find, but this will take some time.
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: use freecad python module of Windows dev version

Post by wmayer »

Python 3.6.1 and 3.6.6 are binary compatible and built with the same compiler for the same platform.
But when loading the FreeCAD module it's important that FreeCAD uses the Python dll of Allplan and that it doesn't load its own one (not sure if the OS does this anyway).
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: use freecad python module of Windows dev version

Post by bernd »

gave it another try with FreeCAD 0.19 and Allplan 2018, same crash of Allplan. Further investigation is needed ...

import-freecad.png
import-freecad.png (183.87 KiB) Viewed 353 times
wmayer
Founder
Posts: 20309
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: use freecad python module of Windows dev version

Post by wmayer »

What happens when you copy the Python dll of FreeCAD and replace (save the original dll to restore it afterwards) that of Allplan? Does it start or does it crash immediately?
User avatar
bernd
Veteran
Posts: 12851
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland
Contact:

Re: use freecad python module of Windows dev version

Post by bernd »

wmayer wrote: Tue Jun 04, 2019 7:47 pm What happens when you copy the Python dll of FreeCAD and replace (save the original dll to restore it afterwards) that of Allplan? Does it start or does it crash immediately?
- renamed python36.dll from FreeCAD bin dirctory
- copied python36.dll from Allplan pgr directroy into FreeCAD bin directory
- start Allplan try to import FreeCAD
- same problem, Allplan crashes at the same point
Post Reply