Trelis Version: Cubit 2020.2 and Cubit 2021.4 Platform: Windows 10
Issue
As part of a python script I am trying to import a number of STEP files.
This works fine when running the python file inside the GUI.
When running the script from command line or from pycharm, STEP files don’t get imported. Here I’ve tried using both system python3 or Cubit embedded python3.
The step_import.log file reports that SPAXStep is not loaded (see message below).
This seems to be specific to python3, because using python2 STEP files do get imported.
Anyone experienced the same?
Any tips?
Warning : SPAXStep library not loaded.
Finish Time : Thu Apr 29 11:36:50 2021
I had append the acis\code\bin already to sys.
So that wasn’t the issue.
Your example, and my code works perfect with python 2.7.18 that shipped with Cubit, and also with system python 2.
But results in failure messages both for step import and export using python 3.8.6 that comes with Cubit.
I have tried on a second machine (also Windows 10), same behavior there.
Any other suggestions?
I’m going to have to dig into this one. Here was my process.
I downloaded the latest 2021.4 release installed it on my Windows 10 machine.
I copied the Cubit learn license from my existing 2021.3 install and put the license in the 2021.4 bin/license folder.
I have python 3.7.9 installed natively on this machine so I started the python installed inside of Cubit.
a) C:\Program Files\Coreform Cubit 2021.4\bin\python3\python test.py
The file test.py contains the script from the previous post. I generate the correct STEP file, brick.stp.
Thanks for trying. I tried the same procedure as you specified, using this test.py script, on two machines, using two versions, and both paid and cubit-learn license.
Unfortunately no success (see screenshot below).
I also tried re-installing 2021.4, just to double-check.
Anything else I could try?
For now I can move on using python 2, but will need python3 at some point.
I have been unable to replicate this problem. I will turn this over to our QA people and see if they can determine what is happening. We will likely deprecate python 2 at some point, so this is an important issue for us as well.
We have figured out what was happening. Python 3 has changed how DLLs are loaded on Windows. The GUI was taking of this correctly. We have modified code so that this bookkeeping is now down for both the GUI and when loading from python.
In the meantime here is a work-around. You have to add the ACIS library path to your environment PATH variable.