I was poking around in this forum and I saw the following image.
How do I enable this view of the model in the combo view? I'm attempting to learn how to traverse a model and this would help me understand how the model is constructed.
-David
How to get a tree view of objects with their types?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: How to get a tree view of objects with their types?
This may be some help.
Code: Select all
doc = FreeCAD.ActiveDocument
for obj in doc.Objects:
FreeCAD.Console.PrintMessage("obj.Name = "+obj.Name+"\nobj.Label = "+obj.Label+"\nstr(obj) = "+str(obj)+"\nstr(type(obj)) = "+str(type(obj))+ "\nobj.TypeId = "+obj.TypeId + " \n\n")