This is the first time I use FreeCAD. I have seen many people use "FreeCAD.Console.PrintMessage" to output information. I also try to use this function to output information, but I can't find where is information. I would like to ask where this information is output. Is it output to the python console?
def btn(self):
FreeCAD.ActiveDocument.addObject("Part::Box", "Box")
FreeCAD.ActiveDocument.ActiveObject.Label = "Cube"
FreeCAD.ActiveDocument.ActiveObject.Length = 10 #float(self.lineEdit.text())
FreeCAD.ActiveDocument.ActiveObject.Width = 30 #float(self.lineEdit_2.text())
FreeCAD.ActiveDocument.ActiveObject.Height = 10 #float(self.lineEdit_3.text())
FreeCAD.ActiveDocument.recompute()
FreeCAD.Console.PrintMessage('Hello, World!')
FreeCADGui.SendMsgToActiveView("ViewFit")
Question about "FreeCAD.Console.PrintMessage" 0.19
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 3
- Joined: Tue Jan 11, 2022 3:02 am
Question about "FreeCAD.Console.PrintMessage" 0.19
- Attachments
-
- 2022-01-14_20-13-32.jpg (317.61 KiB) Viewed 1129 times
Re: Question about "FreeCAD.Console.PrintMessage" 0.19
Hi and welcome to the forum!
Please edit your post and enclose the code in code-tags for improved readability.
The output goes to report view. This may depend on the settings in Preferences/General/Output window.
Please edit your post and enclose the code in code-tags for improved readability.
The output goes to report view. This may depend on the settings in Preferences/General/Output window.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 3
- Joined: Tue Jan 11, 2022 3:02 am
Re: Question about "FreeCAD.Console.PrintMessage" 0.19
Thank you very much! It depends on the setting View-Panels -Report View.
Re: Question about "FreeCAD.Console.PrintMessage" 0.19
You're welcome. How about improving your first post anyway?jiong_yang wrote: ↑Mon Jan 17, 2022 3:51 am Thank you very much! It depends on the setting View-Panels -Report View.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
-
- Posts: 3
- Joined: Tue Jan 11, 2022 3:02 am
Re: Question about "FreeCAD.Console.PrintMessage" 0.19
It is very helpful. This question has been fixed.