« Back

I have not found a way how to snap objects inside other objects.

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
I have not found a way how to snap objects inside other objects.
community relation documentation
Answer
3/27/14 12:33 PM
There is no way documented how to snap objects inside other objects.
  1. The functionality should be similar to the objects of type "swimlane" – object should allow or deny other objects to be inside of it.
  2. When this object is moved around, snapped-in objects should move too. Swimlanes have similar functionality except they can't be moved around (they dock to the side or top of the drawing area).
  3. Is it possible to create classes with object snap-in feature, but which do not subclass "__D_swimlane__" class and do not have mentioned side effects?

RE: I have not found a way how to snap objects inside other objects.
Answer
3/8/13 12:40 PM as a reply to Anonymous.
Item 1 and 3 of above:
The object you are looking for is “Aggregation” as it also has the automatic “Is inside” relation similar to the swimlane.
Use the “class cardinality” of the aggregation to define your “Is inside” options.
A Sample that allows 2 objects of class-1 and nothing from class-2 is below:

CARDINALITIES
RELATION "Is inside"
FROM_CLASS "class-1" max-incoming:2
FROM_CLASS "class-2" max-incoming:0


Item 3 of above
Currently there is no object available that enables to move all “snapped-in” objects. We will investigate, how such a feature can be implemented with ADOscripts.