Search found 33 matches

Go to advanced search

by Chri1
Mon May 20, 2019 12:42 pm
Forum: Forum in Deutsch
Topic: Bearbeiten/Ausrichtung per code
Replies: 1
Views: 111

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
by Chri1
Mon May 20, 2019 11:57 am
Forum: Python scripting and macros
Topic: removeEventCallbackPivy from console
Replies: 1
Views: 96

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") FreeCAD...
by Chri1
Fri May 17, 2019 10:01 am
Forum: Python scripting and macros
Topic: Hide /Close Dialog
Replies: 1
Views: 64

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(self, Dialog...
by Chri1
Fri May 17, 2019 9:09 am
Forum: Python scripting and macros
Topic: QT-Dialog convert to python
Replies: 7
Views: 391

Re: QT-Dialog convert to python

Additional.
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()
And now it works also with: bkneu.doit()

Chr1
by Chri1
Mon May 13, 2019 3:27 pm
Forum: Forum in Deutsch
Topic: Benutzerabfrage Punkt
Replies: 9
Views: 419

Re: Benutzerabfrage Punkt

Hi

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
LG
Chri1
by Chri1
Mon May 13, 2019 10:54 am
Forum: Python scripting and macros
Topic: Interrupt macro for userinput point
Replies: 3
Views: 144

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...
by Chri1
Fri May 10, 2019 3:04 pm
Forum: Forum in Deutsch
Topic: QT-Dialog, uic.py fehlt
Replies: 1
Views: 142

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
by Chri1
Fri May 10, 2019 2:53 pm
Forum: Python scripting and macros
Topic: Interrupt macro for userinput point
Replies: 3
Views: 144

Interrupt macro for userinput point

Hi

I want a macro / dialog be interrupted to allow the user to specify a point by pointing with the mouse.
I know "Observing mouse events in the 3D viewer via Python" but I want the snaps of existing objects to be caught.

(In AutoCAD/Lisp it would be getpoint)

Thanks for help

Chri1
by Chri1
Thu May 09, 2019 2:16 pm
Forum: Python scripting and macros
Topic: QT-Dialog convert to python
Replies: 7
Views: 391

Re: QT-Dialog convert to python

Hi It works! # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'bkneu.ui' # # Created by: PyQt5 UI code generator 5.12.1 # # WARNING! All changes made in this file will be lost! import PySide from PySide import QtGui ,QtCore from PySide.QtGui import * from PySide.QtCore im...
by Chri1
Mon May 06, 2019 6:41 pm
Forum: Python scripting and macros
Topic: QT-Dialog convert to python
Replies: 7
Views: 391

Re: QT-Dialog convert to python

Hi Hi Tried many versions of phython, but finaly it worked like this – thanks Mario: I installed Python: https://www.python.org/ftp/python/3.6.8/python-3.6.8-amd64.exe and from cmd: pip3 install PyQt5-sip pip3 install PyQt5 then Cpyuic5.exe bkneu.ui bkneu.py worked and I mad a .bat: @" C:\Users\...\...

Go to advanced search