Re: Python plug-in -- UML: how to access the association end?



At 14.03.2009 00:02, georges Louis wrote:
Thanks for your answer.

But I still don't get what I am looking for.

I installed "export-object.py" and ran it on my UML diagram : it does not export the multiplicities and roles of UML associations.

So you must be using some (soon to be) obsolete version, e.g. 0.96 ;-)

Here is the XML description of an UML association, extracted from the (uncompressed :-) .dia file :

I just checked with 0.96 and indeed there apparently is no way to get on the information. But for 0.97(-pre2) it seems very obvious.

Please try to read and understand my original mail again while using the current version.
 1) the XML file gives you the property *names* of what you are looking for
 2) export-objects.py does show you how to get on connected objecs
    (an you can also lookup the property names which are available)

E.g. expporting PyDiaObjects.dia has :

[...]
        <DiaObject of type "UML - Association" at 2f03600>
                <bbox>26.3794,10.5732;35.0888,21.2444</bbox>
                <connections>
                </connections>
                <DiaProperties at 01C8AF80 of DiaObject at 02F03600>
                        <DiaProperty at 01C8AF90, "name", string>
                        
                        </DiaProperty>
                        <DiaProperty at 01C8AF80, "direction", enum>
                        </DiaProperty>
                        <DiaProperty at 01C8AF80, "show_direction", bool>
                        </DiaProperty>
                        <DiaProperty at 01C8AF80, "assoc_type", enum>
                        </DiaProperty>
                        <DiaProperty at 01C8AF80, "help", static>
                        </DiaProperty>
                        <DiaProperty at 01C8AF80, "role_a", string>
                        
                        </DiaProperty>
                        <DiaProperty at 01C8AF90, "multipicity_a", string>
[...]

        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]