Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: «Midnight» on January 30, 2006, 04:55:26 am
-
Anyone have insights on how to handle - thorough the automation interface - the relationship between a boundary (the enclosure, not the UP Boundary Element) and those elements it encloses.
I'm looking to do things like:
- add a boundary to a diagram, then add elements to the boundary
- query a boundary to enumerate the elements it encloses
- create a hierarchy of nested boundaries
It's easy to identify or add a boundary, but from there I'm lost.
David
-
I'm looking to do things like:
- add a boundary to a diagram, then add elements to the boundary
- query a boundary to enumerate the elements it encloses
- create a hierarchy of nested boundaries
It's easy to identify or add a boundary, but from there I'm lost.
I think you'll need to loop through all of the diagram objects on a diagram and calculate (from the left, right, top and bottom attributes) whether it is fully contained within the boundary.
-
Thanks KP,
I was getting resigned to that fate...
Of course boundaries are arbitrary (or whatever) partitionings of a system, so there is really much less of an 'ownership' relation between them and their enclosed elements than in other UML constructs.
I gather I can just line up the elements I want to enclose, calculate the greatest extent of height or width, and then simply plunk down a boundary and size it accordingly.
The other way would sort of be in reverse, as you suggest.