Re: Changing/Setting end_arrow from python Again



At 04.03.2009 13:02, Philip Cavaco wrote:
Hello

I need to set the end_arrow type of a 'Standard - Arc' object from a
python script. How do I create the Arrow instance required?
Even if there would be a way to create the Arrow instance that still would not alow to apply as property because ...

I have been
looking through the python docs, example scripts, and the code but
haven't found what I am looking for.
If you search for 'arrow' in plug-ins/python/*.c there are only few occurences. One of them is PyDia_get_Arrow; note this missing PyDia_set_Arrow.

I have been able to change color
properties by assigning strings (eg. o.properties['fill_colour']='red')
but haven't found the code which enables this.
finally PyDia_set_Color in pydia-property.c

Trying to change the Arrow type directly doesn't work.
the only way to modify DiaObject properties is through the properties or by calling some member functions.

Dia.get_object_type('Arrow') doesn't work either.

From the inline documentation of dia.get_object_type:

"from a type name like \"Standard - Line\" return the factory to create objects of that type ..."

The Arrow type is not a DiaObject.

Any ideas?
Sure, outlined above.

HTH,
        Hans

-------- Hans "at" Breuer "dot" Org -----------
Tell me what you need, and I'll tell you how to
get along without it.                -- Dilbert



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