Thanks for the tip. Copy/Paste works great for vertices!sgrogan wrote:Right Click on Report view > Options > Activate Logging. Gui selections are written to Report view
I'm happy.
Thanks for the tip. Copy/Paste works great for vertices!sgrogan wrote:Right Click on Report view > Options > Activate Logging. Gui selections are written to Report view
Therefore built in selection observer! The only drawback i see is a lot of other informations gets through this way not only selection stuff. Out of curiosity i looked in the code and this i guess could be reused to get Selected message to the status bar. That is to have the following behaviour:sgrogan wrote:Right Click on Report view > Options > Activate Logging. Gui selections are written to Report view
I vote no if copy/paste is not functional.triplus wrote:Would it make sense to explore this further? As copy/paste wouldn't work i am not sure if it makes sense or not.
Actually i tested this and it works good. Therefore i will go for it. It adds additional feature currently not existing and everything else works the same. That is Selected message is added on selection to status bar and it doesn't have a time limit.ppemawm wrote:I vote no if copy/paste is not functional.triplus wrote:Would it make sense to explore this further? As copy/paste wouldn't work i am not sure if it makes sense or not.
Thanks again. I consider this solved.triplus wrote:Selected message is added on selection to status bar and it doesn't have a time limit.
Code: Select all
# -*- coding: utf-8 -*-
class SelObserver:
def addSelection(self,doc,obj,sub,pnt): # Selection
print doc # document
print obj # object
print sub # sub object
print "Coordinates point mouse : ",pnt # coordinate point mouse
try: # triplus code
coor = Gui.Selection.getSelectionEx()[0].SubObjects[0].Curve.Center
print "Coordinates center circle X : ",coor.x
print "Coordinates center circle Y : ",coor.y
print "Coordinates center circle Z : ",coor.z
print "Radius circle : ",Gui.Selection.getSelectionEx()[0].SubObjects[0].Curve.Radius
except Exception:
None
print "_____________________"
FreeCADGui.Selection.removeObserver(s) # desinstalle la fonction residente
s=SelObserver()
FreeCADGui.Selection.addObserver(s) # installe la fonction en mode resident