Code: Select all
# -*- coding: utf-8 -*-
# Macro Begin: /home/mac/SharedData/FC_common/SelectInEdit.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
import FreeCAD
# Gui.runCommand('Std_DlgMacroRecord',0)
# Gui.Selection.addSelection('Unnamed','Body','Sketch.Vertex4',30,-10,0.012,False)
# Macro End: /home/mac/SharedData/FC_common/SelectInEdit.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
Code: Select all
# -*- coding: utf-8 -*-
# Macro Begin: /home/mac/SharedData/FC_common/SelectInModel.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
import FreeCAD
# Gui.runCommand('Std_DlgMacroRecord',0)
# Gui.Selection.clearSelection()
# Gui.Selection.addSelection('Unnamed','Body','',30,-10,0)
# Macro End: /home/mac/SharedData/FC_common/SelectInModel.FCMacro +++++++++++++++++++++++++++++++++++++++++++++++++
Code: Select all
# Gui.Selection.addSelection('Unnamed','Body','Sketch.Vertex4',30,-10,0.012,False)
Code: Select all
# Gui.Selection.addSelection('Unnamed','Body','',30,-10,0)
So:
- 'Unnamed' is the document
- 'Body' is in the tree
- the next argument is obviously what was selected
- 30,-10,0.012 is the mouse position on the click??? and why is Z anything other than 0.0?
- False??? used in one but not the other...why???
Go to the wiki https://wiki.freecadweb.org/Selection_API and it says obsolete...and doesn't detail the arguments anyway.