Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

model generation without firing up the FreeCAD GUI #257

Open
tolot27 opened this issue Jan 1, 2019 · 0 comments
Open

model generation without firing up the FreeCAD GUI #257

tolot27 opened this issue Jan 1, 2019 · 0 comments

Comments

@tolot27
Copy link
Contributor

tolot27 commented Jan 1, 2019

I'd like to generate the 3D packages with main_generator.py script(s). Later on, I'll generate my newly created parts the same way. Unfortunately, the scripts fail with:

C:\Common\FreeCAD-0.17\bin\python.exe main_generator.py
FreeCAD 0.17, Libs: 0.17R13541 (Git)
Traceback (most recent call last):
  File "main_generator.py", line 64, in <module>
    import exportPartToVRML as expVRML
  File "../_tools\exportPartToVRML.py", line 100, in <module>
    clear_console()
  File "../_tools\exportPartToVRML.py", line 93, in clear_console
    mw=FreeCADGui.getMainWindow()
AttributeError: 'module' object has no attribute 'getMainWindow'

Then I realized that I have to call the main_generator.py script(s) with FreeCAD rather than with python. This is not documented by the way.

Afterwards, the FreeCad GUI is poping up the the conversion starts.

During my search regarding to the getMainWindow error I found the documentation about Embedding FreeCADGui. Especially the section Without even firing up the FreeCAD Gui was quite interesting to read. Maybe, this is an option for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant