I want to test how python attr. and para. api work and adjust "height" by python.
so I wrote cga :
attr height = 10
Lot --> extrude(height) Mass.
and python script:
objects= ce.getObjectsFrom(ce.selection, ce.isModel)
for o in objects:
h= ce.getAttribute(o, 'height')
ce.setAttribute(o, 'height', addh)
I hope it can add 10 on height of each building but it returns None. Through debugging, I found "o" is ok (when I choose 5 shapes, 2 shapes without rules, it can report those 3 shapes assigned with rule)
However, it shows [ ] no attribute in "o" (by getAtrributeSource).
so How CAN I get the Attribute defined in the rule by myself and use it in Python Script ????
If Possible, Could anyone help me finish this simple python script??? (just get "height" and add 10 then return the value back to adjust building)????
Thanks a lot!!!!