Hi Ottavio,
On 02/08/2012 11:40 AM, Ottavio Campana wrote:
for o in layer.objects :
for c in o.connections:
for n in c.connected:
if not n.type.name in
("UML - Association"):
...
It works perfectly on dia 0.96 . But when I try to run it in dia 0.97
c.connected is always empty.
Could you add another loop over n? e.g.
for co in n:
if not co.type.name in ("UML - Association"):
I also have another question: suppose I want to make my python plugin
work both with dia 0.96 and 0.97. Is there a way to get the version of
dia in the plugin?
At a first glance, I didn't see any Python function returning a Dia
version number. But you could simply
check the object type where the code differs
Regards,
Steffen
_______________________________________________
dia-list mailing list
dia-list@gnome.org
http://mail.gnome.org/mailman/listinfo/dia-list
FAQ at http://live.gnome.org/Dia/Faq
Main page at http://live.gnome.org/Dia