Aleksey Tsalolikhin (2011-04-08 02:15):
Hi. I exported my network diagram from Visio to XML, and then
imported it into Dia.
My rectangles (that I used to represent objects like servers,
switches, firewalls, etc)
appear in Dia as polygons, which means I can't easily resize them by grabbing
and moving one corner; I have to move each corner individually, and even though
it looks like there are four corners, actually there are 5, so it's
messy to resize the boxes.
I see there is a "Box (R)" object, which is what I want - is there a
way to automatically
convert the Polygons into Box (R) objects?
Automatically with - no, I don't think so. Automatically with a script -
yes.
You should change
<dia:object type="Standard - Polygon"
to
<dia:object type="Standard - Box"
Then instead of
<dia:attribute name="poly_points">
...
</dia:attribute>
You would need to add:
<dia:attribute name="elem_corner">
<dia:point val="..."/>
</dia:attribute>
<dia:attribute name="elem_width">
<dia:real val="..."/>
</dia:attribute>
<dia:attribute name="elem_height">
<dia:real val="..."/>
</dia:attribute>
But you would need to calculate those values. "elem_corner" would
probably be the easiest as this should be the same as "obj_pos". Height
would be max(Y)-min(Y) and width would be max(X)-min(X). By X and Y I
mean sets of x and y coordinates of "poly_points".
Cheers,
Nux.
_______________________________________________
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