Author Topic: Elements contained within a Boundary  (Read 8063 times)

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2919
  • Karma: +54/-3
    • View Profile
Re: Elements contained within a Boundary
« Reply #15 on: July 31, 2020, 08:53:32 am »
Interesting. How do you define a boundary with, say, L-shape? Is that new with V15?

Introduced in EA14
The Sparx Team
[email protected]

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8607
  • Karma: +257/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Elements contained within a Boundary
« Reply #16 on: July 31, 2020, 10:25:09 am »
Enterprise Architect seemingly knows which elements are contained within a boundary in a diagram; when the boundary is dragged, all elements within are dragged along.
However, when programming against EA, I do not seem to be able to find the Elements contained within a Boundary; the Boundary can be found as a DiagramObject, but the Elements and Connectors collections of the Boundary are both empty, and I cannot glance from the documentation how to find the Elements.

I'd appreciate any hints on how to proceed. T.I.A.
AFAIK, there is NO actual API to return this information.  We did a lot of work in detecting visual embedding for model analysis purposes and we had to write a sophisticated script to do the work.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: Elements contained within a Boundary
« Reply #17 on: July 31, 2020, 04:39:37 pm »
Ok, thanks. Looks like I have to make an update to my Inside book.

q.

P.S. A shape script overrides any custom shape. The bends are still selectable (which gives the right Sparx-feeling). And the outmost dimension define the 100x100 area for the shape script.
« Last Edit: July 31, 2020, 05:42:07 pm by qwerty »

Rik van der Schalie

  • EA User
  • **
  • Posts: 35
  • Karma: +0/-0
    • View Profile
Re: Elements contained within a Boundary
« Reply #18 on: September 03, 2020, 05:04:24 pm »
I now have a working solution. By the way, for simple rectangles the StyleEx attribute is empty. You will need to get the dimensions of the boundary from the DiagramObject itself.