Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: tb on August 27, 2008, 04:55:43 pm
-
Hello,
I got a problem. I don't know how to make composite element throught API.
Here is algorythme how I do it:
1. create package aaa
2. add class bbb to package aaa
3. add diagram ccc to class bbb
4. bbb.setSubtype(8)
5. add diagram aaa to package aaa
6. add class bbb to package aaa
After this I'm getting something like this:
(http://terabyte.pl/tza/ea/tree.jpg)
(http://terabyte.pl/tza/ea/classWithout.jpg)
In advanced menu element is set as composite:
(http://terabyte.pl/tza/ea/composite.jpg)
But I cannot do double click and go to subdiagram.
I can do that when I uncheck Make composite in advanced menu
and after check it again.
After this action small icon is showing in right bottom corner
and now I can go to ccc diagram after double click.
(http://terabyte.pl/tza/ea/class.jpg)
I cannot solve what is changing after checking Make composite
action. I was even comparing binary files.
Can You help me ?
-
You need to set the 'child' diagram to reference it's parent. There's also some - I don't remember what - configuration that indicates which of several possible children the double-click goes to. [That might just be the first child, but I don't remember quite how you set it up.]
This has been explained in the forum from time to time. There was certainly a description posted this year. I don't remember more than that the how-to part was posted in replies, not the first post of the thread.
Take a while to search the forum.
Also, look at the t_diagram table. You'll see that there is a Parent entry for the child diagram. [Which you can access via the ParentID of the Diagram object.] That's one end of the equation. You'll have to scout around for how to handle multiple children.
HTH, David