Search found 45 matches

Go to advanced search

by mfasano
Wed Sep 18, 2019 12:49 am
Forum: Python scripting and macros
Topic: dialog box will not show
Replies: 12
Views: 278

Re: dialog box will not show

It works now. I did not have parentheses after __init__()

Code: Select all

class init_val_prob_dialog(QtWidgets.QDialog, Ui_init_val_prob_dialog):
    def __init__(self):
        super(init_val_prob_dialog, self).__init__()
        self.setupUi(self)
        self.show()
Thank you very much vocx.
by mfasano
Mon Sep 16, 2019 11:24 pm
Forum: Python scripting and macros
Topic: dialog box will not show
Replies: 12
Views: 278

Re: dialog box will not show

I thought I would try reinstalling FreeCad. OS: Windows 10 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0.18.16131 (Git) Build type: Release Branch: releases/FreeCAD-0-18 Hash: 3129ae4296e40ed20e7b3d460b86e6969acbe1c3 Python version: 3.6.6 Qt version: 5.6.2 Coin version: 4.0.0a OCC ...
by mfasano
Fri Sep 13, 2019 6:29 pm
Forum: Python scripting and macros
Topic: dialog box will not show
Replies: 12
Views: 278

Re: dialog box will not show

I found that the argument for .setupUi() should be QtWidgets.QDialog as Mario does. class init_val_prob_dialog(QtWidgets.QDialog, Ui_init_val_prob_dialog): def __init__(self): super(init_val_prob_dialog, self).__init__ self.setupUi(QtWidgets.QDialog) now I get this error Traceback (most recent call ...
by mfasano
Fri Sep 13, 2019 12:36 pm
Forum: FEM
Topic: FreeCAD as pre-post procesor for MBDyn
Replies: 44
Views: 1131

Re: FreeCAD as pre-post procesor for MBDyn

Creat work. He could have saved himself work if he would not have done it from scratch but would have used some existant code from FEM instead. mfasano already knew about that GSoC project. I only knew that it had been proposed by the MBDyn authors. I did not know about an actual project. He didn't...
by mfasano
Thu Sep 12, 2019 12:38 pm
Forum: Python scripting and macros
Topic: dialog box will not show
Replies: 12
Views: 278

Re: dialog box will not show

Thanks vocx for the help. The class Ui_init_val_prob_dialog(object) is generated using pyside2-uic from a UI file. the other class init_val_prob_dialog(QtWidgets.QDialog, Ui_init_val_prob_dialog) is something I copied from somewhere. including self as an argument in .setupUi worked. Now it has a pro...
by mfasano
Wed Sep 11, 2019 6:43 pm
Forum: Python scripting and macros
Topic: dialog box will not show
Replies: 12
Views: 278

Re: dialog box will not show

These are functions, right? So you should call them. super(init_val_prob_dialog, self).__init__() self.setupUi() self.show() If you don't write the parentheses, you are just treating them as variables (they return the reference to their internal object). I tried that and I got an error that says I ...
by mfasano
Wed Sep 11, 2019 1:39 pm
Forum: FEM
Topic: FreeCAD as pre-post procesor for MBDyn
Replies: 44
Views: 1131

Re: FreeCAD as pre-post procesor for MBDyn

josegegas wrote:
Wed Sep 11, 2019 12:45 pm
mfasano wrote:
Wed Sep 11, 2019 12:36 pm
MBDyn needs to be run from a terminal. Is there a way to run a shell script from python?
Yep. I've don this. So that MBDyn can be executed from FreeCAD with a click...
From the video it looks like you open shell and run a command.
by mfasano
Wed Sep 11, 2019 12:36 pm
Forum: FEM
Topic: FreeCAD as pre-post procesor for MBDyn
Replies: 44
Views: 1131

Re: FreeCAD as pre-post procesor for MBDyn

MBDyn needs to be run from a terminal. Is there a way to run a shell script from python?
by mfasano
Wed Sep 11, 2019 12:05 am
Forum: Python scripting and macros
Topic: dialog box will not show
Replies: 12
Views: 278

dialog box will not show

I am trying to create a script where it opens a dialog box for user input. I used Qt creator to make a UI file and pyside2-uic to make a python file for the dialog box. When I run it, the dialog box does not show. Thanks. OS: Windows 10 Word size of OS: 64-bit Word size of FreeCAD: 64-bit Version: 0...
by mfasano
Tue Sep 10, 2019 1:58 pm
Forum: FEM
Topic: FreeCAD as pre-post procesor for MBDyn
Replies: 44
Views: 1131

Re: FreeCAD as pre-post procesor for MBDyn

We are not the first to consider using FreeCAD as a pre and post processor for MBDyn. The progrmmers of MBDyn thought of making it a Google Summer of Code project. I guess that never happened. Maybe if we make a good start of it, we could make extending it a Summer of Code project.

Go to advanced search