manipulating properties



hello list,

i tryed to create DiaObjects by python which works fine. but when i try to set 
some properties like 'name' it seams all properties are readonly.

o = dia.get_object_type("UML - Class").create(10,10)
dia.active_display().diagram.active_layer.add_object(o[0])
o[0].properties.get('name').value = "MyClass"
[...]
TypeError: 'DiaProperty' object has only read-only attributes (assign 
to .value)

is there a special methode to set properties or another way to build models by 
python?

thanks
bernd

-- 
telesis Entwicklungs- und Management GmbH · Hof 4 · A-6861 Alberschwende
Tel +43 5579 7171 79 · Fax -71 · Mobil +43 699 17717179
http://telesis.at/ · bernd roessl telesis at



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]