Beispiel #1
0
 def testPrint(self):
     sLog = FreeCAD.GetStatus("MessageBox", "Log")
     sErr = FreeCAD.GetStatus("MessageBox", "Err")
     sWrn = FreeCAD.GetStatus("MessageBox", "Wrn")
     sMsg = FreeCAD.GetStatus("MessageBox", "Msg")
     FreeCAD.SetStatus("MessageBox", "Log", 0)
     FreeCAD.SetStatus("MessageBox", "Err", 0)
     FreeCAD.SetStatus("MessageBox", "Wrn", 0)
     FreeCAD.SetStatus("MessageBox", "Msg", 0)
     FreeCAD.PrintMessage("   Printing message\n")
     FreeCAD.PrintError("   Printing error\n")
     FreeCAD.PrintWarning("   Printing warning\n")
     FreeCAD.PrintLog("   Printing Log\n")
     FreeCAD.SetStatus("MessageBox", "Log", sLog)
     FreeCAD.SetStatus("MessageBox", "Err", sErr)
     FreeCAD.SetStatus("MessageBox", "Wrn", sWrn)
     FreeCAD.SetStatus("MessageBox", "Msg", sMsg)
Beispiel #2
0
 def Activated(self):
     if FreeCAD.activeDocument() != None:
         FreeCAD.activeDocument().addObject("App::FeatureTest")
     else:
         FreeCAD.PrintMessage("No active document.\n")