Now I need add some custom property to the compound object, but the code can not run. The code is:
Code: Select all
AConductorLine = FreeCAD.activeDocument().addObject("Part::Compound",FreeCAD.ConductorName)
AConductorLine.addProperty("App::PropertyFloat", "lzhCustom")
AConductorLine.lzhCustom = 0.67
Code: Select all
RuntimeError: Type Part::Compound cannot dynamically add properties
I need using "Part::Compound" to create object is, the 4 line compounded can be rotated translated in the meantime. It looks like the 4 lines are one object. So I need using "Part::Compound" object to Compound the 4 line.
So I need find out a way to add some custom property to "Part::Compound" object.
Need suggestions. Thanks a lot.