Search found 86 matches
- Tue Aug 13, 2019 3:07 pm
- Forum: Python scripting and macros
- Topic: removeEventCallbackPivy from console
- Replies: 3
- Views: 755
Re: removeEventCallbackPivy from console
Another question: The Information should be visible only until mouseclick. But whole FreeCAD crashes with: .... def getpoint(self,event_cb): global objectAnn event = event_cb.getEvent() if type(event) == SoMouseButtonEvent: print("Ende") self.view.removeEventCallbackPivy(SoEvent.getClassTy...
- Mon Jul 29, 2019 9:50 am
- Forum: Python scripting and macros
- Topic: Cancel a program from a child window
- Replies: 1
- Views: 234
Cancel a program from a child window
Hi I have a class "andocken" which calls a Dialogwindow. (The dialogwindow is another class (Ui_Dialog) in a another file (andock_diag.py) ) class andocken: def __init__(self,val): import bkNeu_diag reload(bkNeu_diag) self.d = QtGui.QDialog(FreeCADGui.getMainWindow()) self.d.ui=andock_diag...
- Fri Jul 19, 2019 4:42 pm
- Forum: Forum in Deutsch
- Topic: Abbrechen eines Programmes von einem child-Window aus
- Replies: 0
- Views: 410
Abbrechen eines Programmes von einem child-Window aus
Hi Habe eine Python-Frage: Die Klasse "andocken" ruft ein Dialogfenster auf (andere Datei, andere Klasse) class andocken: def __init__(self,val): import bkNeu_diag reload(bkNeu_diag) self.d = QtGui.QDialog(FreeCADGui.getMainWindow()) self.d.ui=andock_diag.Ui_Dialog() self.d.ui.setupUi(self...
- Mon May 20, 2019 12:42 pm
- Forum: Forum in Deutsch
- Topic: Bearbeiten/Ausrichtung per code
- Replies: 1
- Views: 307
Bearbeiten/Ausrichtung per code
Hi
Wie kann ich den Befehl Bearbeiten/Ausrichtung innerhalb eines Python-Code verwenden?
Oder muss ich es in 2 Teilen (Verschieben, Drehen) erledigen? (Das wollte ich mir ersparen)
LG
Chri1
Wie kann ich den Befehl Bearbeiten/Ausrichtung innerhalb eines Python-Code verwenden?
Oder muss ich es in 2 Teilen (Verschieben, Drehen) erledigen? (Das wollte ich mir ersparen)
LG
Chri1
- Mon May 20, 2019 11:57 am
- Forum: Python scripting and macros
- Topic: removeEventCallbackPivy from console
- Replies: 3
- Views: 755
removeEventCallbackPivy from console
Hi I have an EventCallback which fixes an AnnotationLabel at the Cursor and is finished by mouse-left-click: import FreeCADGui, Part from pivy.coin import * import FreeCAD App = FreeCAD import Draft objectAnn = None class cursorInf: global objectAnn global gp def __init__(self): print("anf"...
- Fri May 17, 2019 10:01 am
- Forum: Python scripting and macros
- Topic: Hide /Close Dialog
- Replies: 1
- Views: 326
Hide /Close Dialog
Hi I have a dialog-window for userinput of parameters for a cuboid. There is a OK-Button and after clicking it, the Dialog should disappeare - That is my problem! Then a new Dialog appeares "Click a Insertion Point" .... import DraftSnap ..... class Ui_Dialog(QtGui.QDialog): def setupUi(se...
- Fri May 17, 2019 9:09 am
- Forum: Python scripting and macros
- Topic: QT-Dialog convert to python
- Replies: 7
- Views: 1874
Re: QT-Dialog convert to python
Additional.
After some try and error I added this Code:
And now it works also with: bkneu.doit()
Chr1
After some try and error I added this Code:
Code: Select all
class doit():
def __init__(self):
self.d = QQtGui.QMainWindow()
self.d.ui = bkneu.Ui_Dialog()
self.d.ui.setupUi(self.d)
self.d.show()
Chr1
- Mon May 13, 2019 3:27 pm
- Forum: Forum in Deutsch
- Topic: Benutzerabfrage Punkt
- Replies: 9
- Views: 878
Re: Benutzerabfrage Punkt
Hi
Im "Python scripting and macros" bin ich der Sache auf die Spur gekommen:
LG
Chri1
Im "Python scripting and macros" bin ich der Sache auf die Spur gekommen:
Code: Select all
https://forum.freecadweb.org/viewtopic.php?f=22&t=36270&p=307863#p307863
Chri1
- Mon May 13, 2019 10:54 am
- Forum: Python scripting and macros
- Topic: Interrupt macro for userinput point
- Replies: 3
- Views: 597
Re: Interrupt macro for userinput point
Thanks A first attempt worked out: I typed in Phyton-Console: import DraftSnap def cb(point): if point: print (point) and with every FreeCADGui.Snapper.getPoint(callback=cb) I get the the snapped point of an existing object (Depending on the current snap-settings) There seem to be a lot more options...
- Fri May 10, 2019 3:04 pm
- Forum: Forum in Deutsch
- Topic: QT-Dialog, uic.py fehlt
- Replies: 1
- Views: 380
Re: QT-Dialog, uic.py fehlt
Habe eine Lösung gefunden:
Siehe Forum "Python scripting and macros"
https://forum.freecadweb.org/viewtopic. ... 81#p306922
LG
Chri1
Siehe Forum "Python scripting and macros"
https://forum.freecadweb.org/viewtopic. ... 81#p306922
LG
Chri1