Python access to OCC version.

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Python access to OCC version.

Post by keithsloan52 »

If I use about FreeCAD and copy information I can find out what version of OCC FreeCAD was built with. Is there anyway to get this information from python? Like if a program wanted to check what version was installed?
Last edited by keithsloan52 on Tue Nov 23, 2021 8:35 pm, edited 1 time in total.
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Python access to OCC version.

Post by wmayer »

Not yet. But with git commit 7f50605c61 there is now a way with:

Code: Select all

App.ConfigGet("OCC_VERSION")
keithsloan52
Veteran
Posts: 2756
Joined: Mon Feb 27, 2012 5:31 pm

Re: Python access to OCC version.

Post by keithsloan52 »

wmayer wrote: Tue Nov 23, 2021 11:58 am Not yet. But with git commit 7f50605c61 there is now a way with:

Code: Select all

App.ConfigGet("OCC_VERSION")
Thanks
TheMarkster
Veteran
Posts: 5505
Joined: Thu Apr 05, 2018 1:53 am

Re: Python access to OCC version.

Post by TheMarkster »

>>> Part.OCC_VERSION
'7.5.3'
wmayer
Founder
Posts: 20245
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: Python access to OCC version.

Post by wmayer »

TheMarkster wrote: Wed Nov 24, 2021 11:18 pm >>> Part.OCC_VERSION
'7.5.3'
I was sure that we once added a way to check the OCC version at runtime but couldn't remember where. However, adding the information to mConfig is still useful because these version numbers will be written to the FreeCAD.log file and this will simplify troubleshooting if we also know the exact versions of 3rd party libraries.
Post Reply