Re: how to invoke unselect() method from DiagramData?



At 16.09.2013 13:13, Bao Niu wrote:
I'm using python script and trying to programmatically pass a newly opened
tab DiagramData to the script.
If you would create the diagram from the script you should already have the diagram object.
The interface is (DiagramData, flags).
How can I invoke unselect(), which is a method of Diagram class, from
DiagramData instantiation?
You could turn a DiagramData object as got from the callback function into a Diagram object by the following function:

def GetAsDiagram (data) :
        for d in dia.diagrams () :
                if d.data == data :
                        return d
        return None

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]