I'm using FreeCAD 0.17 (from the official ApppImage)
I've managed after a long search to activate the draft workbench and show the grid with this code.
Code: Select all
FreeCADGui.activateWorkbench("DraftWorkbench")
Draft.setParam("alwaysShowGrid", True)
Draft.setParam("gridSize",800)
#Draft.setParam()
FreeCADGui.SendMsgToActiveView("ViewFit")
FreeCADGui.activeDocument().activeView().viewTop()
if hasattr(FreeCADGui,"Snapper"):
FreeCADGui.Snapper.grid.on()
FreeCADGui.Snapper.forceGridOff=False
FreeCADGui.activateWorkbench(""MyWorkBench)
Plus there is a manner to change the grid color in python?
TIA and Regards
Carlo D.