##print selected edge length #to see the output hisotry open the Report view (not the Python console) #print "HelloO World\n" #QtGui.QMessageBox.information(None, "edge.Length", text) try: edge = FreeCADGui.Selection.getSelectionEx()[0].SubObjects[0] if edge.ShapeType == "Edge": text = str(edge.Length) + " (edge.Length of " + FreeCADGui.Selection.getSelectionEx()[0].FullName + ")\n" App.Console.PrintError(text) else: App.Console.PrintError("no edge\n") except: App.Console.PrintError("no edge\n")