But, the real question here is in the code below the 'cube' shows up in the tree view with a label 'Shape'
But, the object 'cube' in the code doesn't have a Label property. And, of course, cube.Label fails.
Code: Select all
import Part
# vector 1
v1 = FreeCAD.Vector(0,0,0)
# vector 2
v2 = FreeCAD.Vector(1,0,0)
# edge between v1 and v2
edge = Part.makeLine(v1,v2)
# Face
face = edge.extrude(FreeCAD.Vector(0,1,0))
# Cube
cube = face.extrude(FreeCAD.Vector(0,0,1))
cube.Label='anothercube'
Part.show(cube)